Safari browser Login Page Issue

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();
}

});

});

Hey there @rituraj.barhgoojer! Is there any errors being logged when the safari instance fails to open? Thanks!

I’ve encountered a similar issue. After login, users are redirected back to the login page, due to no being logged in. Disabling the option “Try to prevent cross-site tracking” solved login issue, by permitting third party cookies.

image

Here is a related news article about Safari’s crackdown on privacy and cookies.

I can’t see that Custom Domains are still in beta, so I think the “real” solution is to replace <customer>(.eu).auth0.com with login.<customer>.com so that the third party cookie becomes a first party cookie.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.