-
Notifications
You must be signed in to change notification settings - Fork 460
feat(expo): add biometric trusted devices #9257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
70ce7f0
14c44fc
2e33465
714b97f
7e76048
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| --- | ||
| '@clerk/expo': minor | ||
| --- | ||
|
|
||
| Add iOS and Android APIs for biometric trusted-device enrollment, sign-in, availability, listing, and revocation, including structured native error codes and forward-compatible resource values. Add `useAuthViewState()` for keeping a non-dismissible root `<AuthView />` mounted through an optional trusted-device enrollment prompt, and support configuring the Face ID permission message through the Expo config plugin. | ||
|
|
||
| ```tsx | ||
| import { useTrustedDevices } from '@clerk/expo'; | ||
|
|
||
| export function useBiometricSignIn(identifierHint: string) { | ||
| const { enroll, getAvailability, signIn } = useTrustedDevices(); | ||
|
|
||
| // Call after the user completes a normal sign-in. | ||
| const enableBiometricSignIn = () => | ||
| enroll({ | ||
| identifierHint, | ||
| reason: 'Use biometrics to sign in next time.', | ||
| }); | ||
|
|
||
| // Call when the user returns to sign in. | ||
| const signInWithBiometrics = async () => { | ||
| const { isAvailable } = await getAvailability({ identifierHint }); | ||
|
|
||
| if (!isAvailable) { | ||
| return null; | ||
| } | ||
|
|
||
| return signIn({ | ||
| identifierHint, | ||
| reason: 'Use biometrics to sign in.', | ||
| }); | ||
| }; | ||
|
|
||
| return { enableBiometricSignIn, signInWithBiometrics }; | ||
| } | ||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,8 +20,8 @@ def clerkExpoVersion = clerkExpoPackageJson.version.toString() | |
| // See: https://docs.gradle.org/current/userguide/version_catalogs.html for app-level version catalogs | ||
| ext { | ||
| kotlinxCoroutinesVersion = "1.7.3" | ||
| clerkAndroidApiVersion = "1.0.36" | ||
| clerkAndroidUiVersion = "1.0.36" | ||
| clerkAndroidApiVersion = "1.0.37" | ||
| clerkAndroidUiVersion = "1.0.37" | ||
|
Comment on lines
+23
to
+24
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win 🧩 Analysis chain🌐 Web query:
💡 Result: As of July 27, 2026, the artifacts Citations:
🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '\n== build.gradle snippet ==\n'
sed -n '1,80p' packages/expo/android/build.gradle
printf '\n== search for 1.0.37 references ==\n'
rg -n '1\.0\.37|clerk-android-(api|ui)' packages/expo -S || true
printf '\n== repository declarations ==\n'
rg -n 'mavenCentral|google\(\)|maven \{' packages/expo/android -S || trueRepository: clerk/javascript Length of output: 1908 🏁 Script executed (no clone): Length of output: 327 Replace the Android SDK pins before merging. 🤖 Prompt for AI Agents
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Agreed. This PR is intentionally a draft and is blocked on the native SDK releases. These are temporary placeholder pins for the upcoming Android trusted-device release, so the Android CI failures are currently expected. Once Clerk Android is published, its release workflow will automatically open an Expo dependency-bump PR. I’ll rebase that change and use the published version before marking this PR ready or merging it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
✏️ Learnings added
|
||
| composeVersion = "1.7.0" | ||
| activityComposeVersion = "1.9.0" | ||
| lifecycleVersion = "2.8.0" | ||
|
|
@@ -132,4 +132,6 @@ dependencies { | |
| implementation "androidx.activity:activity-compose:$activityComposeVersion" | ||
| implementation "androidx.lifecycle:lifecycle-runtime-compose:$lifecycleVersion" | ||
| implementation "androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycleVersion" | ||
|
|
||
| testImplementation "junit:junit:4.13.2" | ||
| } | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we include a basic usage example here? Since this will appear in the changelog, an example would help developers understand how to use the new trusted-device APIs
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point! I was on the fence of just including enroll or also adding getAvailability and signIn. I did all three for now, but let me know if a more simple snippet is more typical and I can reduce to just enroll if desired!