Open
Description
Checklist
- I have looked into the Readme, Examples, and FAQ and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Describe the problem you'd like to have solved
I've been tasked with preemptively refreshing the user access token at half of the token lifetime. Regardless of opinions on architecture, there's doesn't appear to be a way to achieve this given getAccessToken
(
nextjs-auth0/src/session/get-access-token.ts
Line 304 in 2199a20
Describe the ideal solution
This ideal solution is adding a parameter to getAccessToken
getAccessToken({refreshThresholdPercent: 50})
Alternatives and current workarounds
Alternative is not having preemptive refresh.
Additional context
No response