supabase icon indicating copy to clipboard operation
supabase copied to clipboard

Enable debug got warning about getsession

Open jlemonz opened this issue 10 months ago • 2 comments

Version

@nuxtjs/supabase: nuxt:

Reproduction Link

Enabled debug in the clientoption. Now i see this in output= GoTrueClient@3 (2.67.3) 2025-03-06T13:22:32.072Z #__loadSession() end

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 may not be authentic. Use supabase.auth.getUser() instead which authenticates the data by contacting the Supabase Auth server.

GoTrueClient@3 (2.67.3) 2025-03-06T13:22:32.154Z #_useSession end GoTrueClient@3 (2.67.3) 2025-03-06T13:22:32.154Z #_acquireLock lock released for storage key supabase-auth-token

So i already have issue that i got logged in with someones session? I cant replicate that but it happens sometimes. Maybe this is the issue? I dont use getsession myself so dont know where this is comming from. https://github.com/nuxt-modules/supabase/issues/462

jlemonz avatar Mar 06 '25 13:03 jlemonz

I found this in the code. I am not sure if this would fix anything. With the issue i had. But i am out of options.

Image

jlemonz avatar Mar 06 '25 17:03 jlemonz

Oke I got my issue again. I was logged in as a different user. I already used the simple middleware example from the docs. No succes.

jlemonz avatar Mar 14 '25 10:03 jlemonz