https://supertokens.com/ logo
Title
c

Christoph

03/08/2023, 6:26 PM
Hi, When calling Session.signout on the frontend (angular, supertokens-web-js), it is sending a GET Request to /api/auth/signout instead of a POST Request, I'm using the Session recipe on the backend (NestJS, supertokens-node), therefore I always get back error 404: "Cookie 'sAcessToken', 'sRefreshToken' and 'sIdRefreshToken' has been rejected"), what am I doing wrong here?
r

rp

03/09/2023, 5:19 AM
get @Christoph - can you show me the network tab screenshot when you call this function?
c

Christoph

03/09/2023, 6:49 AM
I‘m currently at work, coming Home in about 9-10 Hours, then I can send it to you. Thanks
r

rp

03/09/2023, 6:12 PM
This seems to be fine
c

Christoph

03/09/2023, 6:13 PM
Response is {"status":"OK"}, but in the console i get the following error:
and when i click on signout on the right, it shows the following: {"statusCode":404,"message":"Cannot GET /api/auth/signout","error":"Not Found"}
so it seems to send a get request instead of post
r

rp

03/09/2023, 6:14 PM
The screenshot above have a POST request
c

Christoph

03/09/2023, 6:14 PM
yes, signout is working correctly, i was just wondering, because i get this error message in the console
r

rp

03/09/2023, 6:15 PM
After you click sign out, do u see the sAccessToken cookie in the browser’s application tab?
c

Christoph

03/09/2023, 6:15 PM
no just the sIRTFrontend with value remove
r

rp

03/09/2023, 6:18 PM
right. So it's all working fine. You can ignore the browser warning
c

Christoph

03/09/2023, 6:19 PM
one other question, how can i make sure that I am logged out immedialely in other tabs, if I call logout on one tab
r

rp

03/09/2023, 6:20 PM
well, you want to probably create some sort of polling thing on each tab then which query doesSessionExist funciton
otherwise, even if you don't do that, whenever an API call is made or the user navigates in those other tabs, it will detect the logout anyway
c

Christoph

03/09/2023, 6:21 PM
okay thanks for your help