supabase.auth.getSession insecure warning on the server #32917
-
I keep getting the warning in my console. Is what I'm doing really insecure? In my Next.js project, I use Now I still need the user's My concerns:
My questions:
Please enlighten me! Off-topic: I'm also thinking theoretically I could even further reduce the amount of auth requests by just validating the JWT cookie on MY Next.js server instead of calling Supabase auth remotely every time, and only calling them when I need a fresh token/auth. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
This is the best discussion on it. https://github.com/orgs/supabase/discussions/23224 If you rely on RLS and not your server then you can generally pass on the session and RLS will protect you. |
Beta Was this translation helpful? Give feedback.
This is the best discussion on it. https://github.com/orgs/supabase/discussions/23224
If you rely on RLS and not your server then you can generally pass on the session and RLS will protect you.
If you use on the server then you need getUser or to decode the JWT yourself with the JWT secret to insure it is valid. They are working on a new JWT method mentioned in that link to make the decode easier.