Hi, i’m using "@auth0/auth0-spa-js": "^1.13.3",
and recently, to handle failing getTokenSilently in Safari, we enable the Refresh Token Rotation.
Here’s my code to perform getTokenSilently. But how do I check if refresh token is invalid? From auth0, I got 403 invalid_grant and I want to check the refresh token expiration before getting the error. Note that i want to check refresh token expiration, not the access_token.
Thanks in advanced!
try {
const newToken = await auth0Client.getTokenSilently()
if (newToken) {
console.log('newToken', newToken)
return { token: newToken }
}
} catch (error) {
console.log('try getAuth error', error)
}