Is there a way to call a function on the frontend when the user is logged out due to the refresh (no...
c
Is there a way to call a function on the frontend when the user is logged out due to the refresh (not access) token expiring?
r
Hey @chunkygoo.
When the refresh token expires, you get back a 401. You should redirect the user to the loving screen
c
Where do I get this 401 exactly? I have a function that I need to call when the refresh token expires
r
you will get a 401 as a result of the axios / fetch call
c
So currently I am using the provided axios interceptors
Session.addAxiosInterceptors(myAxios);
r
yea, so when u make the axios call, it will return a 401 (i think axios throws)