Is there a function similar to this (needed) for s...
# support-questions
d
Is there a function similar to this (needed) for social logins ? https://supertokens.com/docs/thirdpartyemailpassword/common-customizations/sign-out
r
Calling the signOut will log the user out regardless of how they signed in
But it won't log them out of the social login provider.
d
Thanks
Is there a built in way to clear out all the set cookies on the frontend/
And when clearing out all the cookies from the browser, this happens. Why?
r
If you call signOut, all session cookies are cleared
Is your second question about why that last cookie is there? Or why the refresh is called?
d
Ok, got it regarding the signout. And yes
And when following the code example, it says this.
It is an async funciton
r
Refresh shouldn’t be called when you call sign out.
I’m not sure why that warning is there. You do need to use await
d
You can disregard that message
signOut was a varaible not a function there 😅
r
How r u importing signOut?
d
And I've noticed that somehow I ended up init supertokens with a different pattern
Ok, there are 2 docs available
what is the difference between thirdpartyemailpassword and thirdparty?
See the url
And FYI: since I choose the quick setup path via 'thirdparty' before - I cannot just switch the import
Got the signout fixed
And https://supertokens.com/docs/thirdparty/common-customizations/redirecting-post-login is not very clear imo. When following this, and thus only changing this. It still redirects me to the / page
Because the sample code checks for undefined, but this is not the case for me. It is an empty string, even when I use a fresh browser
r
thirdpartyemailpassword is a recipe that provides social + email password login. Whereas thirdparty is just for social login.
So hey! the
redirectToPath
is undefined if you navigate to the login screen manually and then sign in. The reason it's an empty string for you must be that you navigated to
/
and that automatically redirected you to the login screen (since you must have guarded that route with the auth wrapper). In this case, post sign in, the user should be expected to back to
/
(since they came from that).
d
There are two versions of documentation on the website. Both of them having identical layout, but just the minor import difference
r
And there are a few extra sections in thirdpartyemailpassword like password reset. This doesn't apply to thirdparty
d
aha
I now see the difference of origin, it is by design
r
yuppp
6 Views