Angular getAccessTokenSilently with detailedResponse not working

My app flow is as follows:
When the app loads, I call AuthService.getAccessTokenSilently( {detailedResponse:true}) and I store the access_token and expires_in in session. The access_token for interceptor and expires_in for a timer to refresh the token before expiry.

But I am facing an issue with the getAccessTokenSilently function: When the user has to login (when there is no active session) and comes back to the app, the function returns an object containing both access_token and id_token:

But when the user is already logged in (no redirection), the function just returns the access_token instead of the object even though detailedResponse is passed as true.

The angular version is 12 and the auth0 version is 1.9.0. I need the expires_in to setup refresh and without it, I have to redirect the user even though he is already logged in. What am I missing?

I agree with You!

Why are you saving those token yourself? It’s done with library