Hello Team ,
My lock window does not open safari browser, It always shows me loader and do nothing.
I am using below code. Which is working fine other browsers. Kindly help me in this
Auth.js
import Auth0Lock from ‘auth0-lock’;
const lock = new Auth0Lock(CONFIG.AUTH0_CLIENT_ID, CONFIG.AUTH0_DOMAIN, {
auth: {
redirectUrl: ${window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port: '')}
,
responseType: ‘token’
},
allowedConnections: [‘Username-Password-Authentication’],
autoclose: true,
closable: false,
loginAfterSignup: false,
allowSignUp: true,
signUpLink: ‘/signup’,
languageDictionary: {
title: ‘LicensingX’,
success: {
forgotPassword: ‘An email has been sent to reset your password.’
}
},
theme: {
labeledSubmitButton: true,
logo: “/images/favicon.png”,
primaryColor: “#174B6B”,
}
}
);
lock.on(‘authenticated’, authResult => {
setToken(authResult.idToken,authResult.accessToken);
// get user id from server
getUserByToken(authResult.accessToken).then((response) => {
if(response.response === "success"){
setUserId(response.data);
if(response.data.user_type !== CONFIG.USER_TYPES.Licensee) {
browserHistory.push('/dashboard');
} else {
browserHistory.push('/dashboard/XXXX');
}
} else {
alert(response.message);
logout();
}
});
});