Auth0 integration guide
This document will guide you through configuring Sinch as a Multi-Factor authentication provider in Auth0.
Reminder
This is not a replacement for built-in Auth0's Multi-Factor authentication but rather an alternative.
What you need
- Auth0 account
- Sinch account with enough credits
Collect Sinch application key and secret
-
Navigate to
Apps
in theVerification
section of the Sinch customer dashboard . -
Locate and save the
Key
andSecret
of the application you intend to use with Auth0. You will need them in the next steps.
Install Sinch Verification Action
- Log into your Auth0 dashboard .
-
In the Marketplace find
Sinch Verification
. -
In the next window click
Add integration
. -
Grant the action access it requires. You'll be prompted for
App Key
andApp Secret
. Enter the values that were obtained from the Sinch dashboard in the previous section. -
Click
Create
.
Configure post-login
trigger
-
Navigate to
Actions
->Triggers
in the lefthand menu. -
Find a
post-login
trigger and drag and dropSinch Verification
from installed actions as shown in the picture.
Pass additional metadata
Since Sinch is a plug-in into Auth0's Multi-Factor authentication system, it requires additional setup with regards to the user's phone number collection.
Important!
The requirement is that the user's phone number is passed to user metadata under the name phone_number
.
The following section is one way to achieve this, but there may be more depending on your setup.
Custom sign up screen
-
Navigate to
Branding
->Universal Login
and findAdvanced Options
-
Locate
HTML
in theLogin
tab. -
Find
Auth0Lock
and addadditionalSignUpFields
with the following data. You might want to add more, for instance,icon
to customize the screen to your liking. Refer to official documentation for all available options.
var lock = new Auth0Lock(config.clientID, config.auth0Domain, {
...
additionalSignUpFields: [{
name: "phone_number",
placeholder: "phone number",
}]
});
Once this is done, the Sinch Verification integration is ready for use.