Name: guardian-example
Owner: Auth0
Description: Example for Guardian configuration
Created: 2016-07-14 17:27:01.0
Updated: 2018-03-05 15:35:34.0
Pushed: 2016-09-15 12:52:46.0
Homepage: null
Size: 1181
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Example for Guardian configuration and transaction API
You need to setup the following variable on your server in order for this example to work
0_API_TOKEN: 'See https://auth.com/docs/api/management/v2',
0_DOMAIN: '{tenant}.auth0.com',
0_SECRET: 'Client secret: DON\'T NOT COMMIT TO GIT REPO',
0_CLIENT: 'Client id',
0_TENANT: 'Name of your tenant',
0_REGION: 'au|us|eu',
IE_SECRET: 'Secret to sign generated cookies DON\'T NOT COMMIT TO GIT REPO',
PI_SECRET: 'Secret to sign your own tokens DON\'T NOT COMMIT TO GIT REPO'
Activate Guardian an use the following multifactor rule
tion (user, context, callback) {
(user.user_metadata && user.user_metadata.use_mfa === false){
return callback(null, user, context);
ntext.multifactor = {
provider: 'guardian', //required
ignoreCookie: true, // optional. Force Auth0 MFA everytime this rule runs. Defaults to false. if accepted by users the cookie lasts for 30 days (this cannot be changed)
turn callback(null, user, context);