Native passkeys is currently available in limited Early Access. To learn more about Auth0 releases, review Product Release Stages.
- Universal Login passkeys for web-based applications.
- Native passkeys for Android and iOS applications.
How it works
Native passkeys use a combination of the Auth0 Authentication API and native iOS or Android APIs to embed challenge flows directly into your mobile application. This allows you to create an integrated signup and login experience for your application that does not rely on redirecting users through their browsers to complete authentication. The following example demonstrates what a new user may experience during the passkey signup flow:- A new user launches your mobile application and accesses the login screen. Since they are a new user, they select the Sign Up button.
- On the next screen, the user enters their email address and selects Create Account.
- Next, the user is asked if they want to create a passkey for your application. To proceed, the user selects Continue.
- To generate a passkey, the user must locally authenticate on their device using biometrics or another authentication method, such as entering a PIN.
- After local authentication is complete, a new passkey is saved to the user’s device and synced with their passkey provider, such as iCloud or Google.
- After the passkey is saved, the user continues your new user registration process to finalize their account.
Before you begin
Configure a custom domain
Native passkeys require the use of a . Before proceeding, ensure you have configured a custom domain for your tenant. To learn more, review Custom Domains.Configure your passkey policy
Before you can implement native passkeys for Android or iOS applications, you must configure a passkey policy in your Auth0 tenant. To prepare your tenant, follow the steps in Configure Passkey Policy.Prepare your application
To prepare your application for native passkeys, you must configure your Device Settings and add thePasskey
grant. You can complete these configurations through your or the .
Auth0 Dashboard
- Navigate to Applications > Applications and select the application you wish to update.
- At the bottom of the Settings tab, select Advanced Settings. Then, choose the Device Settings tab.
- Complete the iOS and Android sections as needed for your application. Then, click Save Changes.
- In the Advanced Settings section, select the Grant Types tab.
- Enable the Passkey grant, then select Save Changes.
Management API
Call the Update a Client endpoint and:- Update
grant_types
to includeurn:okta:params:oauth:grant-type:webauthn
. - Use the
mobile
object to specify iOS and Android device settings as needed.
Implement passkey flows
You can define the following passkey flows for your application:- Signup flow: Allows new users to generate and save a passkey during the user registration process.
- Login flow: Allows an existing user who has already enrolled in passkeys to authenticate with their saved passkey during the login process.
Signup flow
A user initiates the passkey signup flow when they first attempt to log in to your application. If the user provides an identifier that already exists, it’s recommended that you prompt the user to complete the login flow instead. Otherwise, the action will fail.Flow steps
- A user visits your application and chooses to register a new account. The user provides an identifier requested by your application, such as their email address.
- Your application then initiates the signup challenge by calling the Request Signup Challenge endpoint of the Auth0 Authentication API:
- If you do not specify a
realm
, your tenant’s default directory is used. - By default, email is the required identifier. If you have enabled Flexible Identifiers for your database connection, you may use a combination of
email
,phone_number
, orusername
instead. These options can be required or optional and must match your Flexible Identifier configuration.
-
In response, Auth0 returns PublicKeyCredentialCreationOptions along with an
auth_session
ID: -
Your application then completes the user registration process using the appropriate native APIs:
- Review Android registration documentation.
- Review iOS registration documentation.
-
Your application then uses the credential information obtained through the registration process, including
authn_response
details, to call the Token endpoint: -
Auth0 creates a new user account and returns the requested tokens to complete the flow:
Login flow
An existing user initiates the passkey login flow when they attempt to log in to your application. This flow only applies to existing users who have saved passkeys to their accounts during initial signup.Flow Steps
-
A user launches your application and begins the login process. Your application then initiates the login challenge by calling the Request Login Challenge endpoint of the Authentication API:
If you do not specify a
realm
, your tenant’s default directory is used. -
In response, Auth0 returns PublicKeyCredentialRequestOptions along with an
auth_session
to continue the flow in your application: -
Your application then completes the login process using the appropriate native APIs:
- Review Android login documentation.
- Review iOS login documentation.
-
Your application then uses the credential information obtained through the login process, including
authn_response
details, to call the Token endpoint: -
Auth0 authenticates the credentials and returns the requested tokens to complete the flow:
References
The following resources can be referenced when implementing native passkeys for your mobile application:- Auth0 Authentication API
- Android resources
- iOS resources