Skip to content

fix(expo-passkeys): pass userVerification to iOS passkey requests - #10850

Merged
wobsoriano merged 2 commits into
mainfrom
rob/expo-passkeys-user-verification
Nov 16, 2026
Merged

wobsoriano merged 2 commits into
mainfrom
rob/expo-passkeys-user-verification

Conversation

@wobsoriano

@wobsoriano wobsoriano commented Nov 16, 2026 •

Copy link
Copy Markdown
Member

Description

Fixes #10842.

The iOS module never set userVerificationPreference, so iOS sent .preferred even when FAPI asked for required. A credential provider can then skip user verification, and FAPI rejects the assertion with passkey_authentication_failure.

Sign-in now passes userVerification through getWithOptions, and registration sets .required. Older binaries without getWithOptions keep calling get. Android is unchanged.

Before (2.2.1) and after on an iOS 27 simulator. The log lines come from a temporary os_log that isn't in this PR.

expo-passkeys-uv-10850.mp4

Checklist

  • pnpm test runs as expected.
  • pnpm build runs as expected.
  • (If applicable) JSDoc comments have been added or updated for any package exports
  • (If applicable) Documentation has been updated

Type of change

  • 🐛 Bug fix
  • 🌟 New feature
  • 🔨 Breaking change
  • 📖 Refactoring / dependency upgrade / documentation
  • other:

🤖 Generated with Claude under Rob's supervision.

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
clerk-js-sandbox Ready Ready Preview Nov 16, 2026 11:25pm UTC
swingset Ready Ready Preview Nov 16, 2026 11:25pm UTC

Request Review

@changeset-bot

changeset-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5876530

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@clerk/expo-passkeys Patch
@clerk/expo Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai

coderabbitai Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

iOS passkey registration requests now require user verification. Passkey retrieval accepts an optional user-verification preference, which the iOS module forwards from its options. JavaScript now selects retrieval methods by platform: iOS uses getWithOptions when available, while Android uses it only when immediate credentials are preferred and the method exists. Both platforms fall back to get.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Severity of issue fixed: Medium

Possibly related PRs

  • clerk/javascript#10776: Adds the iOS getWithOptions method and JavaScript routing used here to pass retrieval options.

Suggested reviewers: dstaley

Merge Risk: Minimal · up to 58765

iOS passkey sign-in now forwards the requested user-verification preference, and registration requires user verification. Older native binaries keep the previous behavior. No merge-blocking risk was identified.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title names the package, the change type (fix), and the core change: passing userVerification to iOS passkey requests. This matches the changeset, which passes userVerification through getWithOpti…
Description check Passed The description states the bug: the iOS module never set userVerificationPreference, so iOS sent preferred when required was requested. It also explains the fix: userVerification flows through getWith…
Linked Issues check Passed Issue #10842 requires the native iOS passkey request to honor the userVerification value from request options. The diff meets this for sign-in. In packages/expo-passkeys/src/index.ts, the iOS branch c…
Out of Scope Changes check Passed All changes relate to the linked issue. The AccountManager.swift, ClerkExpoPasskeysModule.swift, and src/index.ts changes implement the iOS userVerification pass-through and the registration requireme…
Full details: Title check

Explanation

The title names the package, the change type (fix), and the core change: passing userVerification to iOS passkey requests. This matches the changeset, which passes userVerification through getWithOptions for sign-in and sets registration to required on iOS.

Full details: Description check

Explanation

The description states the bug: the iOS module never set userVerificationPreference, so iOS sent preferred when required was requested. It also explains the fix: userVerification flows through getWithOptions, registration sets required, and older binaries fall back to get. This matches the changed files.

Full details: Linked Issues check

Explanation

Issue #10842 requires the native iOS passkey request to honor the userVerification value from request options. The diff meets this for sign-in. In packages/expo-passkeys/src/index.ts, the iOS branch calls ClerkExpoPasskeys.getWithOptions with serializedPublicCredential.userVerification. ClerkExpoPasskeysModule.swift forwards it to AccountManager.getPasskey, which sets assertionRequest.userVerificationPreference when a value is present. Older binaries without getWithOptions still call get, as the PR describes. Registration in AccountManager.swift hard-codes registrationRequest.userVerificationPreference = .required instead of passing the request option through create. The issue lists hard-coding as a workaround and proposes passing the option through create. This is a partial deviation from the proposed approach, but the registration request now requires user verification, which the reported failure needs. The issue's secondary suggestions (FAPI error text, ClerkAPIResponseError naming) are not claimed by the PR and are not required. Android behavior is unchanged: the same JSON is passed to get or getWithOptions. The PR author reports a simulator test, which supports the iOS change. No automated test was added or run (pnpm test unchecked), but the issue does not request a test.

Full details: Out of Scope Changes check

Explanation

All changes relate to the linked issue. The AccountManager.swift, ClerkExpoPasskeysModule.swift, and src/index.ts changes implement the iOS userVerification pass-through and the registration requirement. The index.ts Android branch is restructured, but it keeps the same call shapes and preference handling, so it supports the issue's statement that Android is unaffected. The changeset file declares a patch release for @clerk/expo-passkeys, which matches the bug fix. No unrelated changes were found in the reviewed diffs.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Linked repositories: Some configured repositories could not be included in this review. Cross-repository analysis may be incomplete. Please check linked-repository access and settings.

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 945c671 and 5876530.

Files selected for processing: 4

  • .changeset/expo-passkeys-ios-user-verification.md
  • packages/expo-passkeys/ios/AccountManager.swift
  • packages/expo-passkeys/ios/ClerkExpoPasskeysModule.swift
  • packages/expo-passkeys/src/index.ts
Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

Included review availability: This review used your included allowance. 9 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour.

@pkg-pr-new

pkg-pr-new Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@clerk/astro

npm i https://pkg.pr.new/@clerk/astro@10850

@clerk/backend

npm i https://pkg.pr.new/@clerk/backend@10850

@clerk/chrome-extension

npm i https://pkg.pr.new/@clerk/chrome-extension@10850

@clerk/clerk-js

npm i https://pkg.pr.new/@clerk/clerk-js@10850

@clerk/electron

npm i https://pkg.pr.new/@clerk/electron@10850

@clerk/electron-passkeys

npm i https://pkg.pr.new/@clerk/electron-passkeys@10850

@clerk/eslint-plugin

npm i https://pkg.pr.new/@clerk/eslint-plugin@10850

@clerk/expo

npm i https://pkg.pr.new/@clerk/expo@10850

@clerk/expo-biometrics

npm i https://pkg.pr.new/@clerk/expo-biometrics@10850

@clerk/expo-google-signin

npm i https://pkg.pr.new/@clerk/expo-google-signin@10850

@clerk/expo-native-components

npm i https://pkg.pr.new/@clerk/expo-native-components@10850

@clerk/expo-passkeys

npm i https://pkg.pr.new/@clerk/expo-passkeys@10850

@clerk/express

npm i https://pkg.pr.new/@clerk/express@10850

@clerk/fastify

npm i https://pkg.pr.new/@clerk/fastify@10850

@clerk/hono

npm i https://pkg.pr.new/@clerk/hono@10850

@clerk/localizations

npm i https://pkg.pr.new/@clerk/localizations@10850

@clerk/mosaic

npm i https://pkg.pr.new/@clerk/mosaic@10850

@clerk/nextjs

npm i https://pkg.pr.new/@clerk/nextjs@10850

@clerk/nuxt

npm i https://pkg.pr.new/@clerk/nuxt@10850

@clerk/react

npm i https://pkg.pr.new/@clerk/react@10850

@clerk/react-router

npm i https://pkg.pr.new/@clerk/react-router@10850

@clerk/shared

npm i https://pkg.pr.new/@clerk/shared@10850

@clerk/tanstack-react-start

npm i https://pkg.pr.new/@clerk/tanstack-react-start@10850

@clerk/testing

npm i https://pkg.pr.new/@clerk/testing@10850

@clerk/ui

npm i https://pkg.pr.new/@clerk/ui@10850

@clerk/upgrade

npm i https://pkg.pr.new/@clerk/upgrade@10850

@clerk/vue

npm i https://pkg.pr.new/@clerk/vue@10850

commit: 5876530

@wobsoriano
wobsoriano marked this pull request as ready for review November 16, 2026 23:23
@blacksmith-sh

blacksmith-sh Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Matches iOS sign-in forwards userVerification

Before, iOS sign-in called get with only challenge and rpId; after, it calls getWithOptions with userVerification required, with and without preferImmediatelyAvailableCredentials.

Merge-base

Native call

This PR 58765304

Native call

Also checked · 2 match · 2 not run

Blocked iOS assertion requires verification · Blocked
Blocked iOS registration requires verification · Blocked
Matches Older binaries fall back to get
Matches Android sign-in unchanged

Note

Proof planned 2 claims but was not able to run them:

Needs the iOS Simulator

  • iOS assertion requires verification
  • iOS registration requires verification

Proof on 58765304 · mocked: ClerkExpoPasskeys native module (the native module only exists inside an iOS or Android app build; a stub records...) · not run: iOS app (AuthenticationServices) (the Linux sandbox has no Xcode or iOS Simulator) · Did Proof get it right? Yes · No

View full Proof report · React 👎 or comment @codesmith dismiss this proof to dismiss

@github-actions

Copy link
Copy Markdown
Contributor

API Changes Report

Generated by Break Check on 2026-11-16T23:27:47.518Z

Summary

Metric Count
Packages analyzed 20
Packages with changes 0
🔴 Breaking changes 0
🟡 Non-breaking changes 0
🟢 Additions 0

No API Changes Detected

All packages have stable APIs with no detected changes.


Report generated by Break Check

Last ran on 5876530.

@wobsoriano
wobsoriano requested a review from a team November 16, 2026 23:30
@wobsoriano
wobsoriano merged commit b3e7b29 into main Nov 16, 2026
62 checks passed
@wobsoriano
wobsoriano deleted the rob/expo-passkeys-user-verification branch November 16, 2026 23:45

This branch was successfully deployed

2 active deployments
Preview – swingset — 58765304 Deployed Nov 16, 2026 by vercel[bot]
Preview – clerk-js-sandbox — 58765304 Deployed Nov 16, 2026 by vercel[bot]
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.

expo-passkeys (iOS): userVerification not passed to ASAuthorization, 1Password passkeys fail with passkey_authentication_failure

2 participants