Hey everyone. I am using supertokens with nextjs a...
# support-questions-legacy
i
Hey everyone. I am using supertokens with nextjs and fastapi and everything is working fine just that in the frontend refresh token is not getting set. I tried using React and it is working fine, so is this an issue with nextjs? Edit: If I delete all 3 cookies and then hard refresh the page, the refresh token gets set,
r
hey @ikak1595 the refresh token is shown in cookie storage only when you navigate to the refresh API path on chrome. Otherwise chrome hides it.
i
@rp_st So do I have to hit some route to get the refresh token?
r
not really. If the access token stuff is working, then the refresh token is also saved in the browser. Just that chrome doesn't show it until you visit the refresh API path on chrome
i
@rp_st what is this st-last-access-token-update? What value does it store?
r
it stores the last time the access token was updated. So it's time in milliseconds
If you visit the refresh API path on the browser, you should see the sRefreshToken cookie
i
What is the endpoint for this refresh api path?
r
by default it is /auth/session/refresh
but it depends on the configured apiBasePath
i
Ohh got it thanks a lot
r
👍
i
But after hitting that endpoint also it won't show the refresh token in the cookie storage. AM I correct?
r
it should
if you navigate to that endpoint on your browser, it should
i
If I go to /auth/session/refresh it does show the refresh token but I go to any other page and then refresh the page again, it hides the refresh token again.
r
yea. thats just chrome doing its thing
i
ohh ok and just one more thing if chrome is not showing the refresh token, then does access token get refreshed automatically?
r
yes
i
ok thanks a lot sir
3 Views