Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

useAuth's user data persists after logout #10674

Open
GeorgeHulpoi opened this issue Jan 19, 2025 · 0 comments
Open

useAuth's user data persists after logout #10674

GeorgeHulpoi opened this issue Jan 19, 2025 · 0 comments

Comments

@GeorgeHulpoi
Copy link
Contributor

Describe the Bug

The user still persists after logout. Only two times the user will be null (in dev) after logout. The final output will be the old user data.

Link to the code that reproduces this issue

https://github.com/GeorgeHulpoi/payload-use-auth-bug

Reproduction Steps

  1. Create the user and login
  2. Logout
  3. The user from useAuth is the data before logout (check console).

Which area(s) are affected? (Select all that apply)

area: ui

Environment Info

Binaries:
  Node: 20.9.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  payload: 3.17.1
  next: 15.1.5
  @payloadcms/db-mongodb: 3.17.1
  @payloadcms/email-nodemailer: 3.17.1
  @payloadcms/graphql: 3.17.1
  @payloadcms/next/utilities: 3.17.1
  @payloadcms/payload-cloud: 3.17.1
  @payloadcms/richtext-lexical: 3.17.1
  @payloadcms/translations: 3.17.1
  @payloadcms/ui/shared: 3.17.1
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 10 Pro
  Available memory (MB): 14189
  Available CPU cores: 16
@GeorgeHulpoi GeorgeHulpoi added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Jan 19, 2025
@paulpopus paulpopus self-assigned this Jan 20, 2025
@github-actions github-actions bot removed the status: needs-triage Possible bug which hasn't been reproduced yet label Jan 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants