Hello! I am working with SuperTokens and it was working perfectly. One day it stopped working on my ...
j
Hello! I am working with SuperTokens and it was working perfectly. One day it stopped working on my machine (MacOS) and now sends infinite refresh request. Reinstalling my machine did not resolve the issue. All request succeed with 200. Each Response-Header contains a new Set-Cookie property. The response of the call is an empty object
{}
. AfThe infinite refresh requests continue after deleting the cookie and logging in againAny ideas where the issue could be? On a different machine (Linux) it, is still working fine. The production environment also works fine. Running Supertokens in Docker with Python-Backend and Vue.js Frontend
r
Hey @james_neumann
This can happen if there if the system time of either your machine or your server is out of sync
j
Both the server and the machine is in sync and are both in the same timezone
r
can you show the request and response headers for one of the refresh API calls?
j
r
right ok. And even after this, the refresh API is called again?
j
Jep. It just uses the cookie returned from the previous response headers in the request headers in the next call. This repeats infinitely.
r
Hmm. Can you enable frontend debug logs and show the output from the browser console when the infinite refresh is happening?
j
It seems like after this action
"saveTokensFromHeaders: Setting sFrontToken: eyJhdGUiOjE2ODc3Njc1ODAxMzcsInVpZCI6IjEwYWFkNmQzLTMzMmYtNGFjYy1hYzQ1LTE1YTM0YzI3NTMxYyIsInVwIjp7InN0LXBlcm0iOnsidCI6MTY4Nzc2Mzk4MDEyOSwidiI6W119LCJzdC1yb2xlIjp7InQiOjE2ODc3NjM5ODAxMTgsInYiOltdfX19", supertokens-website-ver: "16.0.8"}
it repeats.
r
what is the contents of your frontend cookie store?
A screenshot will do
j
r
right. Whats the session.init config on the frontend?
j
Oh god, I found the issue... The
sessionTokenFrontendDomain
in the init call was not set to localhost but to my production domain. I'm very sorry for bothering you. Thanks for the quick help!
r
happy to help 🙂