nuxt-modules / supabase

Supabase module for Nuxt.
https://supabase.nuxtjs.org
MIT License
726 stars 129 forks source link

Console.warn 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. #416

Closed BritLuey closed 1 month ago

BritLuey commented 1 month ago

I have been using Nuxt Supabase for a few project and recently after updating I am getting this console warning on every first load:

WARN 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.

The issue is I'm not calling supabase.auth.getSession() anywhere in my repo

I am really unsure of how to reproduce this; or how to explain it, I'm out of my depth frankly. Can anyone help?

Version

@nuxtjs/supabase: latest nuxt: latest

miloctav commented 1 month ago

I got the same issue here.

How did you solved it @BritLuey ?