You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tldr;
What is the best practice to refresh the token or how would you recommend triggering it?
The example has provided a refresh endpoint (/refresh). When the access token has expired, it seems to raise AuthJWTException. Do we capture the exception and redirect to the /refresh endpoint? How to do it?
Thank you in advance 🙏
The text was updated successfully, but these errors were encountered:
I had the same question but then after thinking a little the /refresh logic works in the frontend when the auth_token expires back-end returns an exception that is handled on the front-end, it should send another request to the /refresh endpoint this time with the refresh token and it will return the auth_token and this cycle will continue until the refresh_token is expired.
When the refresh_token is expired the /refresh endpoint will return an exception and this is when the front-end will redirect the user to the login page, and another cycle will start.
tldr;
What is the best practice to refresh the token or how would you recommend triggering it?
The example has provided a refresh endpoint (
/refresh
). When the access token has expired, it seems to raiseAuthJWTException
. Do we capture the exception and redirect to the/refresh
endpoint? How to do it?Thank you in advance 🙏
The text was updated successfully, but these errors were encountered: