Safari freezes when using Passkey when devTools are opened

I see that on some sites (possibly many) the passkeys verification freezes when devtools are opening.

I tried to debug and see that it hangs in navigator.credentials.get.


STR:

  1. Go to https://passkeys-demo.appspot.com/
  2. Enter random username and click Next
  3. Enter password and click Next
  4. Create a Passkey.
  5. Sign out.
  6. Select USE ONE BUTTON SIGN-IN INSTEAD
  7. Open dev tools.
  8. Try to Sign in with passkey.


Expected result:

  1. User successfully logged in - technically navigator.credentials.get returns credentials.


Actual Result:

  1. navigator.credentials.get stucks in infinite loading and nothing happened - no any errors.


My assertion options looks like:

{
    "challenge": "K8WztCaAZM5-ST7r198F6UD4iLZ09IINHSiDJBgHHq4",
    "allowCredentials": [],
    "timeout": 60000,
    "userVerification": "preferred",
    "rpId": "passkeys-demo.appspot.com"
}


In source code on this demo site the code


  options.allowCredentials = []; <---- breakpoint hit here

  // Invoke WebAuthn get
  const cred = await navigator.credentials.get({
    publicKey: options,
    // Request a conditional UI
    mediation: conditional ? 'conditional' : 'optional'
  });

  const credential = {}; <---- breakpoint NOT hit here (after removing breakpoint above and after macOS touch ID is completed)



Posted on Jun 13, 2024 2:01 AM

Reply

Similar questions

There are no replies.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Safari freezes when using Passkey when devTools are opened

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.