Skip to content

Commit 6152a64

Browse files
authored
fix(plugins): do not set states on client (#490)
1 parent 116e7bc commit 6152a64

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

src/runtime/plugins/supabase.client.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,6 @@ export default defineNuxtPlugin({
4141
const currentSession = useSupabaseSession()
4242
const currentUser = useSupabaseUser()
4343

44-
// Initialize user and session states
45-
const {
46-
data: { session },
47-
} = await client.auth.getSession()
48-
currentSession.value = session
49-
currentUser.value = session?.user ?? null
50-
5144
// Updates the session and user states through auth events
5245
client.auth.onAuthStateChange((_, session: Session | null) => {
5346
if (JSON.stringify(currentSession.value) !== JSON.stringify(session)) {

0 commit comments

Comments
 (0)