You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, certain apps return NotAllowedError, which is also returned in case the user cancels the operation or the operation times out. Should the latter return AbortError?
Also, if we want to find out proactively whether passkeys are supported, the following would typically return TypeError
navigator.credentials.get({
publicKey: {}
})
Would that be the case when passkeys are not supported? Would the above return something other than TypeError?
And in order to check if the browser supports some kind of WebAuthn credentials, but not necessarily user-verifying discoverable platform credentials, then you can check for the existence of window["PublicKeyCredential"]:
if(window["PublicKeyCredential"]){// WebAuthn support exists in browser (but no guarantee that any authenticator is available)if((awaitPublicKeyCredential.getClientCapabilities()).passkeyPlatformAuthenticator){// Built-in passkey authenticator or hybrid transport is availablenavigator.credentials.get(/* ... */)}else{// Built-in passkey authenticator is not available, but some other kind of authenticator may be supportednavigator.credentials.get(/* ... */)}}else{// WebAuthn is not supported}
Description
In the event where passkeys are not supported, certain apps do return
NotSupportedError
as expected withHowever, certain apps return
NotAllowedError
, which is also returned in case the user cancels the operation or the operation times out. Should the latter returnAbortError
?Also, if we want to find out proactively whether passkeys are supported, the following would typically return
TypeError
Would that be the case when passkeys are not supported? Would the above return something other than
TypeError
?Related Links
#2096
The text was updated successfully, but these errors were encountered: