Fix passkey sign-in intermittently doing nothing on desktop web#17
Open
jhurwitz wants to merge 1 commit into
Open
Fix passkey sign-in intermittently doing nothing on desktop web#17jhurwitz wants to merge 1 commit into
jhurwitz wants to merge 1 commit into
Conversation
The conditional mediation (autofill) request started on LoginScreen mount
was still in flight when the user clicked "Sign in with passkey", causing
the browser to reject the second request and the passkey picker to never
appear. This is intermittent: it depends on whether the autofill's options
fetch completes and registers navigator.credentials.get({mediation:
"conditional"}) before the user clicks the button.
Fix by storing an AbortController for the autofill request and aborting it
before starting the explicit one.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The conditional mediation (autofill) request started on
LoginScreenmount was still in flight when the user clicked "Sign in with passkey", causing the browser to reject the explicit request and the passkey picker to never appear.This is intermittent: it depends on whether the autofill's options fetch completes and registers
navigator.credentials.get({mediation: "conditional"})before the user clicks. When it loses the race, the browser throws "A request is already pending" — no picker appears, the button briefly shows "Signing in..." then reverts, and the error shows below.Fix: store an
AbortControllerfor the autofill request and abort it at the top ofhandlePasskeyLogin, before starting the explicit request.🤖 Generated with Claude Code