Skip to content

fix(login): Correctly handle iOS Turnkey user cancellations - #2586

Open
sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/login-cancellation-ios
Open

sentry[bot] wants to merge 1 commit into
masterfrom
seer/fix/login-cancellation-ios

Conversation

@sentry

@sentry sentry Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

This PR addresses an issue where user-initiated cancellations during the login process on iOS devices were being incorrectly reported as critical errors in Sentry.

Problem:
On iOS, when a user cancels the biometric or passkey prompt during login (e.g., via Turnkey), the error object returned by Turnkey has the shape { error: 'UserCancelled' }. However, the useUser.ts login catch block was only checking for error?.name === 'NotAllowedError' to identify user cancellations. This mismatch caused legitimate user cancellations to fall through to the generic error capture, leading to false Error logging in reports in Sentry.

Solution:

  1. Enhanced isWebAuthnUserCancelledError: The shared utility function isWebAuthnUserCancelledError in lib/execute.ts has been extended to include a check for error?.error === 'UserCancelled'. This makes the helper robust enough to identify Turnkey's iOS-specific cancellation signal.
  2. Updated useUser.ts: The login error handling in hooks/useUser.ts now utilizes the enhanced isWebAuthnUserCancelledError helper. This ensures that user cancellations on iOS are correctly identified and handled as warnings (or silently), preventing them from being reported as errors.

Impact:
This fix reduces Sentry noise by accurately classifying user cancellations during iOS login, providing a clearer view of actual login failures.

Fixes SOLID-115

@sentry <feedback>: Autofix iterates on these changes
@sentry stop iterating: Autofix stops iterating on this run

This PR was automatically generated by Sentry. You can adjust this setting at any time.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
solid-app Ignored Ignored Preview Sep 24, 2026 10:44pm UTC
solid-app-staging Ignored Ignored Preview Sep 24, 2026 10:44pm UTC

Request Review

This branch has not been deployed

No deployments
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.

0 participants