Hello, i have a problem. When I log out of one acc...
# support-questions-legacy
j
Hello, i have a problem. When I log out of one account and then log in into another one, it somehow pushes me to the first account. What could be the problem? Doesn't sign out function revoke the session?
r
Hey! Sign out does revoke the session. Can you enable backend and frontend debug logs and show me it’s output during the sign out api call?
To enable that, checkout the troubleshooting section in the docs
j
Back end looks like this when signing out
Using emailpassword signout function on frontend
The problem is that it doesn't immediately push me to the other account, but when I go to other route (let's say route clients), it pushes me out from the logged in account and suddenly I'm in the account that I have signed out of.
Front end looks like this, it says server responded with status 401 and then it logs me out
Although the 401 status code may be, because I changed access_token_validity to 1 second, because only then the "account swapping" didn't occur.
r
Can you please enable frontend / backend debug logs from supertokens and show the output? It’s hard to know what’s happening without them
j
Sure a sec
Here are the logs
r
Hmm. So it seems that the sign out ran as normal. What’s the cookie values in the cookie store after sign out ends?
Maybe it will be easiest if we get on a quick debugging call.
j
after login into first account
after log out
r
this is correct!
j
after loggin in to second account
r
this too seems fine
j
wanna do a call and maybe i can show you? if you have time
r
yea sure. Sending you a zoom link
j
okay thanks
r
Join Zoom Meeting https://us06web.zoom.us/j/84357066721?pwd=R1hDTWhMYlZiUVRvenhuZXMyc3o2UT09 Meeting ID: 843 5706 6721 Passcode: 889012 One tap mobile +19292056099,,84357066721#,,,,*889012# US (New York) +12532158782,,84357066721#,,,,*889012# US (Tacoma) Dial by your location +1 929 205 6099 US (New York) +1 253 215 8782 US (Tacoma) +1 301 715 8592 US (Washington DC) +1 309 205 3325 US +1 312 626 6799 US (Chicago) +1 346 248 7799 US (Houston) +1 386 347 5053 US +1 564 217 2000 US +1 646 931 3860 US +1 669 444 9171 US +1 669 900 6833 US (San Jose) +1 719 359 4580 US Meeting ID: 843 5706 6721 Passcode: 889012 Find your local number: https://us06web.zoom.us/u/kd3YvKoWxo
Copy code
const options = {
  headers: {
    'Cache-Control': 'no-cache',
  }
};
Copy code
app.use(function(req, res, next) {
  req.headers['if-none-match'] = 'no-match-for-this';
  next();    
});
j
thank you very much again, best support ever
r
happy to help 🙂
For the benefit of anyone reading this thread in the future: The issue was that the the websiteDomain was a proxy for the API domain and that caused issues with caching. The apiDomain was incorrectly set (to websiteDomain) which made requests from supertokens go through the website proxy and that, we think, cached the front-token header in the response headers across logins (returned a status code 304). We have opened an issue about this to see what we can do about this from our side: https://github.com/supertokens/supertokens-website/issues/155
2 Views