Skip to content

Fix yubikeys getting stuck on sign in#2758

Merged
monorkin merged 4 commits intomainfrom
fix-yubikeys-getting-stuck-on-sign-in
Mar 27, 2026
Merged

Fix yubikeys getting stuck on sign in#2758
monorkin merged 4 commits intomainfrom
fix-yubikeys-getting-stuck-on-sign-in

Conversation

@monorkin
Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI review requested due to automatic review settings March 26, 2026 15:15
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses passkey (notably YubiKey) sign-in getting “stuck” by adding an abort path for conditional mediation and adjusting the sign-in UI copy/presentation.

Changes:

  • Abort any in-flight conditional WebAuthn mediation when the user explicitly clicks the passkey sign-in button.
  • Refactor conditional mediation flow to run under an AbortController and ignore abort errors.
  • Update the sessions sign-in view to show a visible “Sign in with a passkey” control and tweak duplicate-registration messaging.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
lib/action_pack/passkey/form_helper.rb Updates duplicate-registration error copy.
app/views/sessions/new.html.erb Makes the passkey sign-in button visible and restyles it.
app/javascript/lib/action_pack/passkey.js Adds abortable conditional mediation to prevent WebAuthn requests from blocking manual sign-in.

Tip

If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/javascript/lib/action_pack/passkey.js
Copilot AI review requested due to automatic review settings March 27, 2026 09:14
@monorkin monorkin merged commit 0a96799 into main Mar 27, 2026
15 checks passed
@monorkin monorkin deleted the fix-yubikeys-getting-stuck-on-sign-in branch March 27, 2026 09:17
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 56 to 58
#perform = async () => {
await this.abortConditionalMediation?.()
this.button.disabled = true
Copy link

Copilot AI Mar 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

abortConditionalMediation() is awaited before starting a manual click (#perform), but the conditional flow also awaits refreshChallenge() which uses fetch() without an AbortSignal. As a result, aborting conditional mediation won’t cancel an in-flight challenge refresh, and the user click can still block until that request completes (which undermines the goal of “unsticking” sign-in on slow/hung networks). Consider threading the same AbortController signal through refreshChallenge (and into fetch({ signal })) so aborting conditional mediation reliably unblocks the manual ceremony start.

Copilot uses AI. Check for mistakes.
@monorkin monorkin mentioned this pull request Mar 30, 2026
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants