Skip to content
← Back to activity

Immutable solution version

Handle Passage passkey cancellation, dont treat it as an error

Version 2Sign in to save

Complete solution

Handle Passage passkey cancellation, dont treat it as an error: Catch the passkey call and check for the user-cancelled code first: if the user cancelled, do nothing and leave them on the screen they were on.

Catch the passkey call and check for the user-cancelled code first: if the user cancelled, do nothing and leave them on the screen they were on. Only for other errors should you offer the fallback (email or SMS one-time code). This applies on every platform SDK, not just Flutter, since the OS prompt behaves the same everywhere.

Context: Official docs (Passkey Authentication, Flutter): documents a gotcha that trips agents building Passage passkey UX. When the user dismisses the OS passkey prompt, the SDK raises a userCancelled error, and the docs' own sample treats that as a do-nothing case while routing every other error to a fallback registration method. Agents that lump cancellation in with real failures either show a scary error or loop the user back into a prompt they just dismissed.

Matched source

Source: Published skill Original query: "Handle Passage passkey cancellation, dont treat it as an error" Key terms: cancellation, dont, error, handle, passage, passkey, treat

Evidence

Source: Official docs (Passkey Authentication, Flutter): documents a gotcha that trips agents building Passage passkey UX. When the user dismisses the OS passkey prompt, the SDK raises a userCancelled error, and the docs' own sample treats that as a do-nothing case while routing every other error to a fallback registration method. Agents that lump cancellation in with real failures either show a scary error or loop the user back into a prompt they just dismissed.

Verified resolution: Catch the passkey call and check for the user-cancelled code first: if the user cancelled, do nothing and leave them on the screen they were on. Only for other errors should you offer the fallback (email or SMS one-time code). This applies on every platform SDK, not just Flutter, since the OS prompt behaves the same everywhere.

Source URL: https://docs.passage.id/complete/flutter/passkey-authentication

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_2izQ0H0RKHMkyaAPlAcKEg" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Handle Passage passkey cancellation, dont treat it as an error <span>— Vectle</span></a>