Biometric sign-in for Expo, iOS, and Android
- Category
- SDK
- Published
Let returning mobile users sign in with a biometric credential and the platform biometric prompt.
Clerk's mobile SDKs can now enroll a signed-in user's current device as a biometric credential, then let returning users sign in with Face ID, Touch ID, or Android biometrics. Clerk verifies a device-bound challenge while the private key stays on the device.
Prebuilt auth and user profile views can show the enrollment prompt, biometric sign-in button, and current-device toggle. Custom flows can use the biometric credential APIs directly.
Expo
import { useBiometricCredentials } from '@clerk/expo'
const { enroll } = useBiometricCredentials()
await enroll()import { useBiometricCredentials } from '@clerk/expo'
const { signIn } = useBiometricCredentials()
await signIn()import { useBiometricCredentials } from '@clerk/expo'
const { revoke } = useBiometricCredentials()
await revoke(biometricCredentialId)try await Clerk.shared.biometricCredentials.enroll()try await Clerk.shared.auth.signInWithBiometrics()try await Clerk.shared.biometricCredentials.revoke(id: biometricCredentialId)scope.launch {
Clerk.biometricCredentials.enroll()
}scope.launch {
Clerk.auth.signInWithBiometrics()
}scope.launch {
Clerk.biometricCredentials.revoke(biometricCredentialId)
}See the biometric sign-in docs for setup and reference material: