Skip to content

Instantly share code, notes, and snippets.

@saenzramiro
Created July 23, 2018 18:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saenzramiro/7a30e21cc7e205097a8e1763f73b1b0c to your computer and use it in GitHub Desktop.
Save saenzramiro/7a30e21cc7e205097a8e1763f73b1b0c to your computer and use it in GitHub Desktop.
me.lock = new Auth0Lock(
process.env.AUTH0_APP_ID,
process.env.AUTH0_URL,
{
container: 'login',
configurationBaseUrl: 'https://cdn.auth0.com',
auth: {
responseType: 'token id_token',
audience: 'https://mytenant.auth0.com/userinfo',
redirect: false,
sso: false,
params: {
scope: 'openid profile email user_metadata app_metadata',
env: process.env.NODE_ENV,
device: {
fp: sha1(macAddress),
platform: platform + ' ' + os.release(),
name: os.hostname(),
hostname: os.hostname()
}
}
},
rememberLastLogin: false,
allowShowPassword: true,
autofocus: true,
autoclose: true,
closable: false,
oidcConformant: true,
avatar: null,
theme: {
logo: require('@/assets/images/logo/64x64.png'),
primaryColor: '#000'
},
languageDictionary: {
title: 'Welcome'
}
});
// Listening for the authenticated event
me.lock.on("authenticated", function(authResult) {
me.getUserInfo(authResult);
});
me.lock.show();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment