Expired Token when requesting a new token

Good morning @huzefa.yousuf, It would be helpful to have a separate HAR file from the initial user so we can compare and contrast what may be going in each scenario.

Also can you share the third user’s email with me in a direct message? Thanks!

@James.Morrison I have an update from my end. As mentioned earlier I was using the Auth0-Angular library for authentication. I tried to use the Rest APIs directly and it seems to work no issues.

This leads me to believe that there is something wrong with the client library ?

Would you be able to share the code change of how you previously implemented it vs how it’s setup now so I can share it with the team @huzefa.yousuf?

sure thing, hopefully that helps in resolving this

Solution NOT working for some clients

//intialize Auth0 
    angularAuth0Provider.init({
      clientID: 'YOUR_CLIENT_ID',
      domain: 'YOUR_DOMAIN',
      responseType: 'token id_token',
      redirectUri: 'YOUR_REDIRECT_URI',
      scope: 'openid email profile'
    });

//Then on my login page, do this
this.angularAuth0.authorize();

//This will take to Auth0 login page, once user's logged in, Auth0 will redirect back to the callback page where I do this
    this.angularAuth0.parseHash((err, authResult) => {      

      if (authResult && authResult.accessToken && authResult.idToken) {        
//everything good ... redirect to home page
      }
      else{
//something went wrong
      }

Proposed solution if this is not resolved

const redirectUri = location.protocol + '//' + location.host + '/login';      
const auth0SigninUri = `https://YOUR_AUTH0_DOMAIN/authorize?response_type=token&client_id=YOUR_AUTH0_CLIENTID&connection=&redirect_uri=${redirectUri}&scope=openid profile email`
window.location = auth0SigninUri;

//once this is returned, its returns an access_token in callback url’s hash, which I then send to /userinfo endpoint to get logged in user’s details

@James.Morrison does it make sense ?

I believe so. Let me pass this along to the team and see what I can get as feedback. Thanks for working with me on this!

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