App continuously sending access tokens

Once I log in, the app keeps sending access tokens. While it doesn’t seem to lead to any issues in the functioning of the app, this seems to be new behaviour. I thought it’s been happening since the time I stopped using Auth0 development keys, but I removed my keys and it’s still happening, so that’s not it (currently using Github social connection, if it’s of relevance).
For Frontend - React SPA
Token durations (seconds)
ID token: 36000
Refresh token rotation (reuse interval): 3600
Absolute lifetime: 2592000
Inactivity lifetime: 1296000

For backend- Go API
Token durations (seconds)
Token expiration: 86400
Token expiration for browser flows: 7200

Screenshot from 2021-04-01 17-11-54

From the browser console. In my useState hook, I added the console.log line:

const token = await getTokenSilently();
console.log(token);

Screenshot from 2021-04-01 17-12-11

From the terminal. The “email” is just a namespaced claim I’ve added to my JWT middleware function, but this also shows that the access token is being sent repeatedly.

Hi @importhuman,

It looks like the getTokeSilently call is being made repeatedly. It’s hard to say why this is happening without more context. Are you using a quickstart or did you build out the implementation yourself?

@dan.woda I used this Auth0 blog as a reference.

It looks like this is all happening in the react app, and shouldn’t be affected by whatever is going on in your Go backend.

It might be better to use the react quickstart, which leverages the auth0-react SDK that has been released since this blog was published.

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