Bug report
I keep getting the getSession() error about 500 times on one page.
Using the user object as returned from supabase.auth.getSession() or from some supabase.auth.onAuthStateChange() events could be insecure! This value comes directly from the storage medium (usually cookies on the server) and many not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.
Describe the bug
This warning should not exist. I do not want to contact supabase on my non-logged in pages to see if a user is logged in. That would be two round trips, which would slow down my app. There is nothing wrong with checking for a session cookie on my server without doing an extra request. Either way, I am following the tutorials exactly.
To Reproduce
Follow any one of the tutorials:
https://supabase.com/docs/guides/auth/server-side/creating-a-client
Expected behavior
Do not show the warning at all, or allow me to disable warnings. At the very least, do not show it 500 times on one page.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
- supabase - 1.151.1
- @supabase/ssr - 0.1.0
- @supabase/supabase-js - 2.41.1
Additional context
It is an issue with this line of code
Please see the linked repository: https://github.com/supabase/auth-helpers/issues/755
J
Bug report
I keep getting the
getSession()error about 500 times on one page.Describe the bug
This warning should not exist. I do not want to contact supabase on my non-logged in pages to see if a user is logged in. That would be two round trips, which would slow down my app. There is nothing wrong with checking for a session cookie on my server without doing an extra request. Either way, I am following the tutorials exactly.
To Reproduce
Follow any one of the tutorials:
https://supabase.com/docs/guides/auth/server-side/creating-a-client
Expected behavior
Do not show the warning at all, or allow me to disable warnings. At the very least, do not show it 500 times on one page.
Screenshots
If applicable, add screenshots to help explain your problem.
System information
Additional context
It is an issue with this line of code
Please see the linked repository: https://github.com/supabase/auth-helpers/issues/755
J