Skip to content

Out of sync server and client state / Client uses invalid session #489

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

Open
xxRockOnxx opened this issue Apr 22, 2025 · 0 comments · May be fixed by #490
Open

Out of sync server and client state / Client uses invalid session #489

xxRockOnxx opened this issue Apr 22, 2025 · 0 comments · May be fixed by #490
Labels
bug Something isn't working

Comments

@xxRockOnxx
Copy link

Version

@nuxtjs/supabase: 1.5.0
nuxt: 3.16.1

Reproduction Link

To follow if requested.

Steps to reproduce

  • install module
  • sign up
  • sign in
  • invalidate by deleting user on supabase dashboard
  • not working

What is Expected?

Client will not have user value because the session/token is now invalid.

What is actually happening?

Client has user value.

The server plugin uses getSession() and getUser() from the sdk.

The client plugin relies on getSession() which according to the Supabase docs is not recommended.

Image

Regardless it's still not the same as server because server uses getUser() for the user.

I might even add not to populate it manually on client side and just handle the updates.

useState() should already share state from server to client.

the server plugin already had it done correctly.

@xxRockOnxx xxRockOnxx added the bug Something isn't working label Apr 22, 2025
@xxRockOnxx xxRockOnxx linked a pull request Apr 23, 2025 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant