Safari 13 支持 WebAuthN,但 WKWebView 不支持。这是测试页面:https://demo.yubico.com/webauthn-technical/registration 。看来 navigator.credentials
没有在 WKWebView 中实现。有没有办法添加 WebAuthN 支持?
最佳答案
正确使用的 API 是这种情况 ASWebAuthenticationSession
:
https://developer.apple.com/documentation/authenticationservices/aswebauthenticationsession
根据我们的测试,在 iOS 13.3 上,它将与 USB、Lightning 或 NFC 安全 key 配合使用。
在 iOS 11 或更低版本上,您应该使用 SFAuthenticationSession
,但显然不支持 WebAuthn。
关于macos - 如何在 MacOS WKWebView 中支持 WebAuthN?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60273455/