Auth0 IdP Configuration
Auth0 Configuration
This is a prerequisite configuration before you deploy your online wallet. In this guide, we will walk you through the steps to configure Auth0 for your wallet and approver application. Auth0 provides a comprehensive identity platform that will enable secure authentication and authorization for your applications.
Prerequisites
Before you begin, make sure you have the following prerequisites in place:
- An Auth0 account
- Access to the Auth0 Management Dashboard
Step 1: Create Required Resources
To configure Auth0 for your wallet and approver application, you need to create the following resources in Auth0:
Single Page Application (SPA) Resource
- This resource will represent your wallet application, which typically runs in a web browser.
- To create an SPA resource, follow these steps:
- Log in to the Auth0 Management Dashboard.
- Go to the "Applications" section.
- Click on the "Create Application" button.
- Choose the "Single Page Application" option.
- Provide a name for your application (e.g., "Wallet App").
- Click on the "Create" button to create the SPA resource.
Native Application Resource
- This resource will represent your approver application, which runs natively on a device (e.g., mobile or desktop).
- To create a Native application resource, follow these steps:
- Log in to the Auth0 Management Dashboard.
- Go to the "Applications" section.
- Click on the "Create Application" button.
- Choose the "Native" option.
- Provide a name for your application (e.g., "Approver App").
- Click on the "Create" button to create the Native application resource.
API Resource
- This resource will represent the API that your applications will communicate with.
- To create an API resource, follow these steps:
- Log in to the Auth0 Management Dashboard.
- Go to the "APIs" section.
- Click on the "Create API" button.
- Provide a name for your API (e.g., "Wallet API").
- Set the
Identifierto a unique identifier for your API (e.g., "https://wallet-api/"). - Click on the "Create" button to create the API resource.
Step 2: Configure Application Settings
Once you have created the required resources, you need to configure the settings for each application.
Configuring Wallet Application (SPA)
- Navigate to the Applications section in the Auth0 Management Dashboard.
- Select your wallet application (e.g., "Wallet App").
- In the application Setting tab, configure the following:
- Under Application URIs
- Add
Allowed Callback URLs,Allowed Logout URLs, andAllowed Web Origins. These will be the full URL of your wallet front-end. (e.g., "https://wallet.yourcompany.com"")
- Add
- Under Cross-Origin Authentication
- Enable
Allow Cross-Origin Authentication - Under
Allowed Origins (CORS)add the full URL of your wallet front-end yet again. (e.g., "https://wallet.yourcompany.com"")
- Enable
- Under ID Token
- Set
ID Token Expirationto36000seconds.
- Set
- Under Refresh Token Rotation
- Enable
Rotation - Set
Reuse Intervalto0seconds.
- Enable
- Under Refresh Token Expiration
- Enable
Absolute Expiration - Set
Absolute Lifetimeto2592000 - Enable
Inactivity Expiration - Set
Inactivity Lifetimeto1296000
- Enable
- Under Advanced Settings
- In the Oauth tab, make sure
JSON Web Token Signature Algorithmin is set toRS256 - Enable the necessary Grant Types, which include
Implicit,Authorization Code, andRefresh Token
- In the Oauth tab, make sure
- Set the Token Endpoint Authentication Method according to your security needs.
- Configure any additional settings specific to your application.
- Under Application URIs
- Save the changes.
Configuring Approver Application (Native)
- Navigate to the "Applications" section in the Auth0 Management Dashboard.
- Select your approver application (e.g., "Approver App").
- In the application Settings tab, configure the following:
- Under Application URIs
- Add the appropriate
Allowed Callback URLsandAllowed Logout URLs, these will match each other. Add entries for each approver app you intend to support:- Mobile ApproverApp:
com.blockdaemon.reactnativeapproverapp://callback - Desktop ApproverApp:
app://./callback
- Mobile ApproverApp:
- Add the appropriate
- Under Cross-Origin Authentication
- Enable
Allow Cross-Origin Authentication
- Enable
- Under ID Token
- Set
ID Token Expirationto36000
- Set
- Under Refresh Token Rotation
- Disable
Rotation
- Disable
- Under Refresh Token Expiration
- Disable
Absolute ExpirationandInactivity Expiration
- Disable
- Under Advanced Settings
- In the Oauth tab, make sure
JSON Web Token Signature Algorithmin is set toRS256 - Enable the necessary Grant Types, which include
Implicit,Authorization Code, andRefresh Token
- In the Oauth tab, make sure
- Under Application URIs
- Save the changes.
Configuring your API
- Navigate to APIs section in the Auth0 Management Dashboard
- Select your API (e.g, "Wallet API")
- In the API Settings tab, configure the following
- Under Access Settings
- Enable
Allow Offline Access
- Enable
- Under Access Settings
- Save the changes.
Step 3: Finding values for Wallet and Approver Apps.
- Navigate to the Applications section in the Auth0 Management Dashboard and select your wallet application (e.g., "Wallet App").
- Under Settings you'll find your
Client IDvalue. - Please take note of these values since you'll need these to set up your Wallet App.
- Under Settings you'll find your
- Navigate to the "Applications" section in the Auth0 Management Dashboard and select your approver application (e.g., "Approver App").
- Under Settings you'll find your
Client IDvalue. - Take note of these values, you'll need these to set up your Approver App.
- Under Settings you'll find your
- Navigate to the APIs section in the Auth0 Management Dashboard and select your API (e.g., "Wallet API")
- Make note of the
API Audienceas you'll need this value when setting up your Wallet App.
- Make note of the
- Click on Applications > Your single page application that you made > Under Settings tab, look for the Domain, and set your issuer to
https://{Domain}. Do not add a trailing slash. The wallet loads OIDC settings from{issuer}/.well-known/openid-configuration; an extra slash produces an invalid URL and wallet startup fails with a discovery 404.