Unable to handle 401 Unauthorized with javascript library

  • Which SDK this is regarding: auth0-js
  • SDK Version: 9.14.0
  • Platform Version: VueJS (Quasar) 2.6.12
  • Code Snippets/Error Messages/Supporting Details/Screenshots:

I am able to login with Universal Login. I am able to retrieve the access and identity tokens. I’m using a custom API that is talking to Firebase. I’m using the Auth0 access token to authenticate the user to Firebase with their custom token authentication. All of this works great!

…until my Auth0 access token expires.

I have read and tried everything I could find. I believe I need to use the checkSession() method but it never returns successfully.

WebAuth options:

{
  clientID: process.env.AUTH0_CLIENTID,
  domain: process.env.AUTH0_DOMAIN,
  redirectUri: process.env.AUTH0_CALLBACK,
  audience: process.env.AUTH0_AUDIENCE,
  responseType: 'token id_token code',
  scope: 'offline_access openid profile email'
}

Thanks in advance for your help!

RESOLVED: I was using Google social provider but the Connection definition was still using the Auth0 developer client ID and secret. After creating credentials in Google Cloud and providing those in the Connection definition the checkSession immediately worked.

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