Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: ca1e44b 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 |
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueComment |
911b510 to
0505abb
Compare
03f95ab to
aa7405a
Compare
19adb60 to
4455c35
Compare
|
Superseded by #9959 (comment) (re-recorded with full-frame-rate capture). |
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ntract tests Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Add secureKeyStorageAvailable to getAvailability() and reject createKey() with secure_key_storage_unavailable when the device has no Secure Enclave, such as the iOS Simulator, instead of failing inside SecKeyCreateRandomKey. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
aa7405a to
f9b9404
Compare
4455c35 to
ca1e44b
Compare
|
Re-recorded with full-frame-rate simulator capture (
The successful Face ID enroll + sign-in on a physical iPhone is recorded on #9960. jsonly-v2-final.mp4 |
Description
Adds
@clerk/expo-biometrics, an experimental Expo native module that handles only the device side of Clerk biometric credentials (trusted_device): Secure Enclave key creation, ES256 signing behind a LocalAuthentication prompt, and the on-device credential records. It does not depend on clerk-ios or clerk-android and makes no FAPI calls. Enrollment, listing, revocation and sign-in move into the@clerk/expohooks on top of the clerk-js resources from #9953 in #9960. Reverification stays on the native SDK in@clerk/expo-native-componentsfor now, because FAPI only lists trusted-device reverification factors for API version2026-08-20and later, and clerk-js doesn't send that version yet.Why a separate package instead of
@clerk/expo-native-componentsor@clerk/expo@clerk/expo-native-components. That package exists to hold the Clerk native SDKs (clerk-ios / clerk-android): the full SDKs, an iOS 17 minimum, the Swift Package and Gradle setup, and a second Clerk client running at runtime. This module needs none of that. Putting it there would make a JS-only app that wants Face ID take on all of it, which is the cost feat(expo-native-components): move native components into @clerk/expo-native-components #9955 removes.@clerk/expo. Expo autolinks every native module in an installed package, so every@clerk/expoapp would link LocalAuthentication,androidx.biometricand this module whether it uses biometrics or not. Apps that ship Face ID code also have to declareNSFaceIDUsageDescription. Only apps that use biometrics should carry that.@clerk/expo-passkeysand@clerk/expo-google-signin: a thin, optional platform package that plugs into@clerk/expo.Trade-offs:
@clerk/expo,@clerk/expo-native-componentsand@clerk/expo-biometrics.reverify()still needs@clerk/expo-native-components. After that, biometrics depends only on this package.ClerkKitand this module read and write the same on-device records because both follow the storage format pinned in test: pin biometric credential storage format clerk-ios#584 (and feat(api): isolate biometric credential storage clerk-android#966 on Android).The iOS implementation follows the clerk-ios biometric credential storage contract v1 (clerk/clerk-ios#584) so that credentials created here and by
ClerkKitin the same app are interchangeable:dev.clerk.trusted_device.<localKeyId>with the contract's access-control flags per policy; JWK and rawr || ssignature encoding match the contract byte for byte.trustedDeviceCredentialsgeneric-password item (serviceClerkKeychainService ?? bundleId, no access group). Reads skip malformed records and writes keep unknown fields and other apps' records.UserDefaultsuses the same key asClerkKit. Every store operation applies it first, soClerkKit's first configuration does not wipe records this module wrote.ClerkKit's@MainActorstore access in the same process.JS API:
getAppIdentifier,getAvailability,createKey,sign,hasKey,deleteKey,listRecords,saveRecord,deleteRecord,ensureInstallationMarker. Every error is aClerkBiometricsErrorwith a stablecode.Android is a stub in this PR: every call rejects with
not_implemented. The Android implementation is in #9961, following the clerk-android v2 storage format (clerk/clerk-android#966).The module's Swift unit tests (a
test_specin the podspec) pin the contract with the same vectors and v1 fixture as clerk-ios. The Expo native build workflow now packs this package into its fixture, so CI compiles it on iOS and Android.Depends on the storage contract in clerk/clerk-ios#584.
Checklist
pnpm testruns as expected.pnpm buildruns as expected.Type of change
🤖 Generated with Claude Code