Join Discord
Powered by
Is there a way to call a function on the frontend ...
# support-questions-legacy
c
chunkygoo.
10/16/2022, 10:55 PM
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
rp_st
10/17/2022, 4:05 AM
Hey
@chunkygoo.
rp_st
10/17/2022, 4:06 AM
When the refresh token expires, you get back a 401. You should redirect the user to the loving screen
c
chunkygoo.
10/17/2022, 6:25 AM
Where do I get this 401 exactly? I have a function that I need to call when the refresh token expires
r
rp_st
10/17/2022, 6:27 AM
you will get a 401 as a result of the axios / fetch call
c
chunkygoo.
10/17/2022, 6:45 AM
So currently I am using the provided axios interceptors
chunkygoo.
10/17/2022, 6:45 AM
Session.addAxiosInterceptors(myAxios);
r
rp_st
10/17/2022, 6:45 AM
yea, so when u make the axios call, it will return a 401 (i think axios throws)
2
Views
Previous
Next