It's fine to use `getSession` here, because on the client, `getSession` issafe, and on the server, it reads `session` from the `LayoutData`, whichsafely checked the session using `safeGetSession`.
It's fine to use `getSession` here, because on the client, `getSession` issafe, and on the server, it reads `session` from the `LayoutData`, whichsafely checked the session using `safeGetSession`.
I follow it all, and it works just fine. But I get a warning(?) at my console:
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 may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.
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 may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.
I'm confused because why made a guide using a method that are considered not secure? but it's considered safe in the guide?
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.