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

Migrate to @supabase/ssr to improve SSR support #417

Closed
th1m0 opened this issue Sep 19, 2024 · 2 comments
Closed

Migrate to @supabase/ssr to improve SSR support #417

th1m0 opened this issue Sep 19, 2024 · 2 comments
Labels
enhancement New feature or request

Comments

@th1m0
Copy link
Contributor

th1m0 commented Sep 19, 2024

Is your feature request related to a problem? Please describe.

It may be beneficial to migrate to @supabase/ssr for improved server-side rendering (SSR) support. This would also resolve SSR warnings like the following:

WARN  Using the user object as returned from supabase.auth.getSession() or from certain supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and may not be authentic. Use supabase.auth.getUser() instead, which authenticates the data by contacting the Supabase Auth server.

Describe the solution you'd like

Migrating to @supabase/ssr could help resolve the SSR-related issues.

Describe alternatives you've considered

N/A

Additional context

I'd be happy to implement this, if this is the direction we want to go into.

See:
https://github.com/supabase/ssr
https://github.com/orgs/supabase/discussions/27037
https://supabase.com/docs/guides/auth/server-side

@th1m0 th1m0 added the enhancement New feature or request label Sep 19, 2024
@larbish
Copy link
Collaborator

larbish commented Sep 19, 2024

We're already using @supabase/ssr under the hood and the warning comes from this lib. I've created an issue to encourage the maintainers to fix it: supabase/auth-js#912. What issues are you facing with SSR?

@larbish larbish closed this as completed Sep 19, 2024
@th1m0
Copy link
Contributor Author

th1m0 commented Sep 19, 2024

Ah, that was stupid of me. I will see if I can fix the issue, then make another issue/PR accordingly! Thank you for the quick response.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants