Webauthn with React in Safari

I am creating a react app and am making use of Webauthn to use TouchID or FaceID for user authentication.

I have built my app so that when the button is clicked, navigator.credentials.create is the only call made.

With attestation set to none, there are no issues however as soon as I set attestation to direct I get an alert saying 'The operation can't be completed' and 'NotAllowedError: This request has been cancelled by the user.' is logged to console.

The issue only presents itself on Safari and iOS devices however works perfectly on other browsers like Chrome.

Has anyone encountered a similar issue and possibly know how to resolve it?

Thanks

Shay

Post not yet marked as solved Up vote post of shay_ Down vote post of shay_
1.6k views
  • What version of iOS and macOS are you testing on?

Add a Comment

Replies

Am facing the same issue, it always shows 'NotAllowedError' I tested by xcode simulator, iOS 16.2

  • Passkeys require passcode or biometrics on iOS. Simulator doesn't support passcode, but you can manually turn on biometrics. In the Simulator app's menu, you can turn on Face ID or Touch ID in the Features menu.

Add a Comment