Timing out in checksession()

I’m having some problems with checkSession(). I’m unfamiliar with the nitty gritty of networks so please bear with me.
I have a SPA where I’ve implemented authentication with Auth0.js and Lock.js. When the user loads the website, checkSession() is ran immediately to log the user in if they had already been logged in recently.
The request seems to working fine, and the log in / log out cycle is functional. However, (testing in Chrome) the browser never stops showing the “loading” spinner and constantly says “waiting for xx.auth0.com…” If I wait long enough I get a time out error.
I’m not quite sure what the problem is because all of my requests (in the Chrome DevTools Networks tab) show either 200’s (the one auth0 call I have) or 304’s (static assets). I read somewhere that I need to send a postMessage() somewhere after calling checkSession? Is this true? Are there any obvious answers? I’d be happy to provide code or config files if it would help. Any and all advice is appreciated. Thank you

Hi @pickledplum,

Can you take a look at this post and see if it solves it?


Hi @dan.woda,

Thank you for the reply. Unfortunately, this didn’t change anything - I still have the same problem.
Any other suggestions?

Thanks so much.

Can you post the code where the timeout is happening?

Thanks for taking the time to reply.
Here is where I set up the Auth0 client:

this.auth0 = new auth0.WebAuth({
  domain: authConfig.domain,
  audience: authConfig.apiAudience,
  clientID: authConfig.clientId,
  redirectUri: authConfig.rootUri,
  responseType: 'id_token token',
  scope: 'openid profile email',
  responseMode: 'web_message',

Where apiAudience is the audience for the custom API i set up in Auth0.

this.auth0.checkSession({}, (err, authResult) => {
    if (err) return reject(err);
    this.idToken = authResult.idToken;
    this.accessToken = authResult.accessToken;
    this.profile = authResult.idTokenPayload;
    this.expiresAt = authResult.idTokenPayload.exp * 1000;
    return resolve(authResult);

This is where I run checkSession (inside a promise).


No problem, that is what we are here for.

Everything looks okay here at first glance. Could you DM me a HAR file so I can take a deeper look?

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