There seems to be an issue with signing out. After...
# support-questions
c
There seems to be an issue with signing out. After calling the signOut() method, I cannot access the /login path as it just redirects me back to the / path
So it seems like it thinks I have a session
r
Hey! Can you send the debug logs for frontend and backend when you call ther sign out function?
c
it doesn't log anything afaik
lemme try again
I am doing this after deleting the user. I also revoke the session in the backend
maybe an edge case?
I have to remove cookies to be able to access the auth path again
r
There should be debug logs for sure. Pleas enable them if not
c
alright I'll try
r
cool
see the docs. There is a troubleshooting section
c
yeah found it! one sec
If I log out without deleting the user it works as expected
r
hmm.
c
Okay, here's the logs from the moment I deleted the user until I tried to visit /login again and it sent me to the / path
r
and the backend logs?
c
here
backend logs are from when I started the server with debugging on
r
oh right.. i see the problem now.
Can you open an issue about this?
c
sure!
r
Will fix it in the next release.
c
cool, thanks! Any workarounds I can do in the meantime?
also, should I open the issue in the node SDK or react SDK?
I'll just put it in the react lib
r
uhmm. About the workaround, you can override the signout API in the session.init and throw an unauthorised error like this:
Copy code
Session.init({
    override: {
        apis: (oI) => {
            return {
                ...oI,
                signOutPOST: async function (input) {
                    let resp = await oI.signOutPOST!(input);
                    if (resp.status === "OK") {
                        throw new Session.Error({
                            message: "Sign out",
                            type: "UNAUTHORISED",
                        })
                    }
                    return resp;
                }
            }
        }
    }
})
And please open in node repo
c
okay thanks! 😄
r
lmk if the above solution works
c
yes! Opening the issue first
r
ok thanks
good catch btw!
c
😄 yeah, the integration is mostly done so now there's only edge cases to smooth out
r
nice!
c
we went live with it yesterday, but deleting the user is not a blocker for prod so I'm doing it now
r
cool
r
thanks!
c
It works! thanks
r
great.
Hey! We have fixed this and released a new supertokens-node version -> 11.0.0. Please try it out. It is a breaking change since the previous version, so be sure to checkout the changelog
c
ok thanks! Will do soon
The new version works! The speed of these fixes is epic, thanks 😄
r
thanks!
2 Views