Closed th1m0 closed 1 month ago
Visit the deploys page to approve it
Name | Link |
---|---|
Latest commit | 987ca63e2a2646ba03ffc2e5bd295ac46e3e34e0 |
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 serverSupabaseSession
as it will delete the user object there.
The server plugin now uses the utility functions serverSupabaseSession
and serverSupabaseUser
Any update? when will be merged?
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 session.user
on the server which would be unsafe.
When client side rendering however it wouldn't be "unsafe" but since we have useSupabaseUser
you should just always use that to access the user.
For now you can just ignore the warning.
Thank you so much for this PR, this warning was driving me insane!
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