Auth0 Native Bridge
Learn how to use issue an Auth0 access token during authsignal flows like passkey auto-fill
In this guide we will show you how to complete authentication with Auth0 in a native mobile app, when using Authsignal’s passkey implementation.
The integration requires configuring a new custom database connection, configuring your Application in Auth0, and finally implementing a back-end API to validate the Authsignal challenge and issue an Auth0 access token.
Integration steps
Create a new custom database connection
Navigate to the Auth0 dashboard Database Connections page
Click on the Create DB Connection button.
Create a new custom database connection.
Complete the form with the following values
New custom database connection configuration.
Configure the custom database action script
Navigate to the custom database section.
Scroll down to Database Action Scripts, copy and paste the following database action script for “Login”
Scroll down to the Database Settings section and add your Authsignal secret key to database settings.
Add your Authsignal secret key to database settings.
That’s it, we’ve created a new custom database connection, which will allow us to use Authsignal as an external authentication source.
Configure your Auth0 Application
In this guide we are using the “Default App” as an example, in order for your integration work ensure that the application you’re using is created as a Regular Web Application.
Create a regular web application
Navigate to the Auth0 Application section
Navigate to the Auth0 Application section and click menu for on the application you want to configure, and select Connections
Application connections.
Turn on the authsignal custom database connection
Ensure that the “authsignal” (the name of the custom database connection we created in the previous step) database connection is turned on.
The authsignal custom database is turned on for the application.
Navigate to the Settings tab, scroll down and expand the advanced settings section and click on Grant Types
Click to check the Password grant type.
Navigate to advanced settings.
Implement a back-end API for validation
Once the above steps are completed, you’ll be able to complete the final step of the integration, the back-end API implementation takes care of validating the Authsignal challenge token (for example when a user completes a passkey sign-in) and issues an Auth0 access token.
The following steps will guide you through the two critical steps that you need to implement in your back-end API. In this guide we will use a Node.js implementation, but you can use any language you prefer.
Initiate Passkey auto-fill on the client side
Initiate Passkey on your mobile client, see documentation.
Validate the Authsignal token and call Auth0 Resource Owner Password Grant API to issue an access token
Pass client side token to the implemented back-end API. In your implementation you are doing the following:
- Authsignal Validate Challenge
- Auth0 Resource Owner Password Grant API.
In this guide we’ve used the scope
values of openid profile email
, and had a placeholder for the audience
value, but you’ll have to configure the appropriate values for your application.
We’ve now completed the integration, please do reach out to us if you have any questions or need any assistance.
Was this page helpful?