https://supertokens.com/ logo
#support-questions
Session exists after sign out
# support-questions
l

Luxaaa

05/24/2023, 12:24 AM
Hi, I have a problem with the Session.sighout function. After calling Session.signOut, the session still exists (Session.Session.doesSessionExist returns true). This is the code of my signout function:
Copy code
javascript
await Session.signOut();
alert(await Session.doesSessionExist())
I am using the supertokens web sdk. Is there anything i did wrong?
n

nkshah2

05/24/2023, 4:21 AM
Hi @Luxaaa Can you post the request and response headers for the sign out call? Also what backend SDK and version are you using?
l

Luxaaa

05/24/2023, 4:26 AM

https://cdn.discordapp.com/attachments/1110725075398819880/1110785958003085362/Bildschirmfoto_2023-05-24_06-26-00.png

@nkshah2 I am using the python SKD version 0.14.0 and supertokens-web-js version 0.5.0.
I am initializing Supertokens with the following code(frontend)
Copy code
javascript

export default function initSupertokens() {
    SuperTokens.init({
        appInfo: {
            apiDomain: "https://....",
            apiBasePath: "/auth",
            appName: "CM",
        },
        recipeList: [
            Session.init(),
            ThirdPartyEmailPassword.init(),
        ]
    });
}
n

nkshah2

05/24/2023, 4:30 AM
Right looks like the cookie header is missing, what are the response headers from the login API?
Also what is the value of apiDomain you are using on the backend and frontend?
l

Luxaaa

05/24/2023, 4:33 AM

https://cdn.discordapp.com/attachments/1110725075398819880/1110787689000751114/Bildschirmfoto_2023-05-24_06-33-12.png

n

nkshah2

05/24/2023, 4:35 AM
Can you hover the warning symbol next to the cookies and see what the message is?
l

Luxaaa

05/24/2023, 4:42 AM
The values for api domain at backend and frontend were different because i did not update the value in my backend config after setting up ngrok to test my pwa on my ipad. I updated the backend config and now it works.
n

nkshah2

05/24/2023, 4:42 AM
Awesome, glad you got it working
l

Luxaaa

05/24/2023, 4:43 AM
Thanks for the hint.
2 Views