supabase-community / nuxt3-quickstarter

13 stars 13 forks source link

Signing out throws errors, doesn't sign out #3

Closed rscorer closed 2 years ago

rscorer commented 2 years ago

Need to use Nuxt rc-6 to make this compile now

In index.vue when you sign out there is no session so the onAuthStateChange fails, simply change to this:

supabase.auth.onAuthStateChange((_, session) => {
  user.value = session?.user
})