Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const getLock = (options) => {
// eslint-disable-next-line
const Auth0Lock = require('auth0-lock').default
return new Auth0Lock(process.env.AUTH_ID, process.env.AUTH_DOMAIN, options)
}
const getLock = (options) => {
const config = require('../config.json')
const Auth0Lock = require('auth0-lock').default
return new Auth0Lock(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_DOMAIN, options)
}
const getLock = (options) => {
const config = require('../config.json');
const Auth0Lock = require('auth0-lock').default;
return new Auth0Lock(config.AUTH0_CLIENT_ID, config.AUTH0_CLIENT_DOMAIN, options);
};
function initializeLock() {
const Auth0Lock = require('auth0-lock').default
return new Auth0Lock(CLIENT_ID, DOMAIN, {
auth: {
params: {
responseType,
scope
},
redirect: false
},
allowSignUp: false,
theme: {
logo,
primaryColor
},
closable: false,
languageDictionary: {
title: message('authentication.logIn')
}
require => {
const Auth0Lock = require('auth0-lock').default;
const {
title = 'olymp',
domain = process.env.AUTH0_DOMAIN,
clientID = process.env.AUTH0_CLIENT_ID,
color = 'green',
logo = 'http://res.cloudinary.com/djyenzorc/image/upload/v1508057396/qkg/ci3onnwcl2isotkvsvrp.png',
} = this.config;
const lock = new Auth0Lock(clientID, domain, {
languageDictionary: {
title,
},
language: 'de',
theme: {
logo,
primaryColor: color,
},
});
let closing = false;
lock.on('authenticated', authResult => {
if (!authResult || !authResult.accessToken) {
return;
}
lock.getUserInfo(authResult.accessToken, (error, profile) => {
if (error) {