Github example code
Cognito lambdas
React Native mobile app
Creating a passkey
Once a user has signed in using their email address or phone number, we can prompt them to create a passkey to use for next time.Prompting the user to create a passkey after sign-in
Lambda integration
To authorize binding the passkey to the user, we will create an authenticated endpoint which our app can call to obtain an Authsignal token. This endpoint will use a JWT Authorizer to authenticate using the Cognito access token.App integration
- Call our endpoint to obtain a short-lived Authsignal token.
- Set the Authsignal token using the React Native SDK.
- Create the passkey using the React Native SDK.
Signing in with a passkey
Now that the user has created a passkey, the next time they sign in we can present them with the option to use their passkey.Using a passkey to sign in
Lambda integration
No changes to our lambda code are required to handle passkeys as a sign-in method - our verify auth challenge response lambda will validate the token which we pass as the challenge answer.App integration
In our React Native app we’ll add some code to our sign-in screen to automatically show the passkey sign-in prompt if the user has one available on their device.useEffect hook when our sign-in screen first appears.

