Ersin Aydoğmuş
Ersin Aydoğmuş

Reputation: 11

supabaseClient.auth.session is not a function

I upgraded from Supabase v1 version to v2 version. But I getting error "supabaseClient.auth.session is not a function" everywhere. Anyone know why?

In Supabase v1 I converted supabase.auth.signIn function to supabase.auth.signInWithPassword .

Upvotes: 1

Views: 6009

Answers (1)

Audrey
Audrey

Reputation: 116

Is there someplace you retrieve the session? If so you would need to update from const session = supabase.auth.session() to const {data: { session },} = await supabase.auth.getSession() which is also highlighted in the upgrade guide: https://supabase.com/docs/reference/javascript/upgrade-guide

Upvotes: 4

Related Questions