Tutorial: Get Auth0 credentials¶
Part A: Create an Auth0 account¶
Step 1: Sign Up¶
Go to https://auth0.com/ and click on Sign Up
Step 2: Register¶
Enter your email and password and click on Next:
Step 3: Choose your tenant¶
- Fill the tenant
- Select your region (where data are stored)
- And click on Next
Step 4: Finalize your account¶
- Fill the information according to your profile
- Click on Create Account
Part B: Create a new application¶
Step 1: Open the new application form¶
- Select Application in the sidebar
- Click on Create Application
Step 2: Set the parameters¶
- Choose a name for your Application
- Select Single Page Web Applications
- And click on Create
Step 3: Get the parameters¶
- Select Settings
- Remember Domain and Client ID
Step 4: Set the callback URL¶
In Allowed Callback URLs, write your server URL :
Warning
Don’t forget the /callback
Step 5: Save the application¶
Click on Save Changes
Part C: Create a new API endpoint¶
Step 1: Open the new API form¶
- Select APIs in the sidebar
- Click on Create API
Step 2: Set the parameters¶
- Choose a name for your API
- Choose a random Identifier and remember it
- Select RS256 for the signing algorithm
- Click on Create
Step 3: Save the API¶
Click on Save
Part D: Create Admin rule¶
Step 1: Open the new Rule form¶
- Select Rules in the sidebar
- Click on Create your first rule
Step 2: Choose an empty rule template¶
- Click on empty rule
Step 3: Edit the new rule¶
- In the title, enter Admin For Metadata
- In the code, enter:
function (user, context, callback) {
var requestedScopes = (
context.request.body.scope ||
context.request.query.scope
)
.split(' ');
if (user.app_metadata &&
user.app_metadata.admin) {
requestedScopes.push('admin');
}
context.accessToken.scope = requestedScopes.join(' ');
callback(null, user, context);
}
- And click on Save
Part E: Authentification providers¶
Select Connections in the sidebar
And configure your favorite authentification provider.
By default, Google is enabled.