The useLocalCredentials() hook enables you to store a user's password credentials on their device and subsequently use biometrics for sign-in. This enhances the user experience by allowing users to sign in using Face ID or another biometric authentication method during future sign-ins.
Warning
This hook isn't supported in web apps and can only be used in native apps.
This API is available only for @clerk/clerk-expo >=2.2.0.
Be aware that this works only for sign-in attempts using a password.
Stores the provided credentials on the device if the device has enrolled biometrics. The end user needs to have a passcode set in order for the credentials to be stored, and those credentials will be removed if the passcode gets removed. The promise will reject if the value cannot be stored on the device.
Name
clearCredentials()
Type
() => Promise<void>
Description
Removes the stored credentials from the device. The promise will reject if the value cannot be deleted from the device.
Attempts to read the stored credentials and creates a sign-in attempt with the password strategy.The promise will resolve to a SignInResource if the stored credentials were accessed. Otherwise, the promise will reject.
The identifier of the credentials to be stored on the device. It can be a username, email, phone number, etc.
Name
password
Type
string
Description
The password for the identifier to be stored on the device. If an identifier already exists on the device, passing only password would update the password for the stored identifier.