nextauthjs / nextauthjs/next-auth
`await signOut` won't work in this situation.
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 28.4k
- Forks
- 4k
- PR merge metrics
- No merged PRs in 30d
Description
Environment
System:
OS: Windows 10 10.0.19045
CPU: (24) x64 13th Gen Intel(R) Core(TM) i7-13700KF
Memory: 13.07 GB / 31.83 GB
Binaries:
Node: 20.15.0 - D:\Program Files\nodejs\node.EXE
Yarn: 1.22.22 - ~\AppData\Roaming\npm\yarn.CMD
npm: 10.7.0 - D:\Program Files\nodejs\npm.CMD
Browsers:
Edge: Chromium (127.0.2651.74)
Internet Explorer: 11.0.19041.4355
npmPackages:
next: ^14.1.4 => 14.2.18
react: 18.2.0 => 18.2.0
Reproduction URL
https://github.com/jcyuan/signout-not-work
Describe the issue
cookie response by signOut will conflict with getSession/useSession which causes signOut failed
How to reproduce
1, npm run dev to run the Reproduction repo
2, login
3, click Gobug button to redirect to the logout page, and you will see it
Expected behavior
explicit cookie controlling order on client side. maybe some solution like stop the SessionProvider's events and auto refetching process when i want (e.g. when i need to call signOut)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by running the linked reproduction repository with npm run dev, then follow the logout-page flow described in the issue. Inspect the interaction between signOut, getSession, useSession, and the SessionProvider events or refetching; done means the logout flow no longer fails because of conflicting cookie responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- next.js, node.js, react, typescript
- Domain
- authentication, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100