background:
I am using Auth0-lock UI for login user, but I am using Auth0-js to refresh the token. I am migrating from Auth0-js V7 (which uses refreshToken method) to Auth0-jv V8 (8.10.1) (which now uses checkSession).
Auth0-lock is also being upgraded from 10.8.1 (which uses v7) to 10.23.1 (which uses v8).
The Auth0-lock works fine for login.
Problem:
In the past, the refreshToken always worked fine, but with V8, whenever I call checkSession, I get an error (after a long time):
{error: “timeout”, error_description: “Timeout during fetching SSO data”}
For reference this is my code in V8:
const webAuth = new auth0js.WebAuth({ domain: config.auth0Domain, clientID: config.auth0ClientId });
webAuth.checkSession({ responseType: 'token' }, (err, authResult) => { if (err) { console.error(err); } });
Also this is my code in V7, which works fine.
const auth0Client = new Auth0({ domain: config.auth0Domain, clientID: config.auth0ClientId, responseType: 'token' });
const storedRefreshToken = localStorage.getItem('refresh_token'); // I manually saved the refreshToken earlier after lock login success. According to V8 checkSession's documentation, I no longer have to do this.
auth0Client.refreshToken(storedRefreshToken, (err, delegationResult) => { if (err) { console.error(err); } });
If someone can tell me why checkSession V8 keep timeout, I would appreciate it.
Thanks