-
Notifications
You must be signed in to change notification settings - Fork 125
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
fix: ssr getSession warning #418
fix: ssr getSession warning #418
Conversation
👷 Deploy request for n3-supabase pending review.Visit the deploys page to approve it
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested it and it works perfectly!
After looking back on this, I thought this could be fixed a little bit better so I made a couple of changes and it will now also suppress the warning when using The server plugin now uses the utility functions |
Any update? when will be merged? |
Depends on when @larbish has the time to review and merge it. This change shouldn't be high prio tho as it will only suppress a warning and prevent users from accessing When client side rendering however it wouldn't be "unsafe" but since we have For now you can just ignore the warning. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @th1m0. I've contacted directly the Supabase team so they can take care of this upstream issue but no news so far so I'll finally merge this one. We can still delete delete session?.user
line once they provide a patch.
Types of Changes
Description
This PR addresses a warning that occurs when calling
supabase.auth.getSession()
on the server:To resolve this, the
user
property is removed from the session object within the server plugin. This prevents theuser
prop from being accessed and stops the warning from being logged.An alternative approach, without deleting the
user
object, could be:Checklist