Best way to use signOut() but also clear a cookie first? #5577
Unanswered
transformmindgarden
asked this question in
Help
Replies: 1 comment
-
@transformmindgarden i have a similar case too, did you happen to figure out a solution for this? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
What I'd like to do is, when the user clicks the sign out button, delete a cookie that's not a next auth cookie, then trigger the built in signOut() call.
Is there a better way than just putting the delete in the header.tsx before the signOut() call? could I wrap the signOut call so when its called after being imported it first deletes the cookie then continues on? When I tried to wrap the signOut function I got ReferenceError: window is not defined suggesting I was calling signOut server side? Thanks for any advice you can provide!
Beta Was this translation helpful? Give feedback.
All reactions