Replies: 1 comment
-
|
Hi, The way I would approach this is:
First of all, you need to create either a server action or API route to delete the AuthJS cookies manually, as you cannot call signOut() as it may create problems in this situation. app/api/force-signout/route.ts Now that you have this endpoint, you create the CloseListener component Then, add it to your layout.tsx file This is how i'd accomplish this. Hope it helps! |
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.
-
We have created a site for our client, and they requested that the sign in process works the same as their previous site, where if a user closes out of the browser, they're signed out.
Looking at their login cookies, we can see that the
Expires / Max-Ageis set toSession, but I have not figured out a way to replicate this using NextAuth + Next.JSAny ideas?
Beta Was this translation helpful? Give feedback.
All reactions