feat(expo): add biometric reverification - #9829
seanperez29 wants to merge 4 commits into
Conversation
Add useBiometricCredentials().reverify() for active sessions on iOS and Android, supporting first-, second-, and multi-factor verification with session synchronization and token refresh. Default new biometric enrollments to biometry_current_set while preserving existing credential policies. Support local native SDK overrides and add reverification tests and documentation.
🦋 Changeset detectedLatest commit: 9c1ddfc The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (1)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
💤 Files with no reviewable changes (1)
Included review availability: 9 reviews are currently available. Your included PR review attempts over the past 7 days set your current allowance at 10 reviews per hour. 📝 WalkthroughWalkthroughThe change adds Priority: ➖ Normal Estimated code review effort: 4 (Complex) | ~45 minutes 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/electron
@clerk/electron-passkeys
@clerk/eslint-plugin
@clerk/expo
@clerk/expo-google-signin
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/mosaic
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
API Changes Report
Summary
@clerk/expoCurrent version: 4.6.8 🟡 Non-breaking Changes (2)Modified:
|
wobsoriano
left a comment
There was a problem hiding this comment.
AI-assisted findings, checked against the pinned native SDKs:
Multi-factor reverification
Both native bridges return after a single
verifyWithBiometricscall. If the first factor returnsneeds_second_factor,reverify()returns an incomplete result with no way to continue that attempt. Calling it again starts a new verification. Can the bridge run the second factor when the first result requires it?
iOS passcode fallback
On iOS, reverification can select an older credential enrolled with
biometry_or_device_passcode. clerk-ios 1.5.5 does not reject that policy, so the device passcode can complete reverification. Android requiresbiometry_current_set. Can iOS enforce the same requirement? This may need a clerk-ios change because the local policy is internal to that SDK.
Manual review otherwise looks good 👍
Description
Adds
useBiometricCredentials().reverify()for first-, second-, and multi-factor verification of active sessions on iOS and Android. The result includes the verification status and synchronized JavaScript session. Completed verification clears cached session tokens and fetches a fresh token without creating another session.New biometric enrollments default to
biometry_current_set, requiring biometrics without device-passcode fallback and invalidating the key when the enrolled biometric set changes. Existing credentials retain their original policies. Android reverification requiresbiometry_current_set; incompatible credentials returnbiometric_credential_policy_incompatibleso apps can offer another verification method.Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change