nuxt-modules / supabase

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

fix(client): prevent useCookie usage outside of effect scope #309

Closed AlbertBrand closed 1 year ago

AlbertBrand commented 1 year ago

Don't call useCookie in onAuthStateChange, as this leads to incorrect behavior and warnings during development.

Types of changes

Description

useCookie is called in onAuthStateChange which is called outside of the Vue effect scope. This triggers the following warning in dev: [Vue warn] onScopeDispose() is called when there is no active effect scope to be associated with.. This warning is muted in prod but the behavior of useCookie subtly changes.

Checklist:

netlify[bot] commented 1 year ago

Deploy request for n3-supabase pending review.

Visit the deploys page to approve it

Name Link
Latest commit f462e58219c9a33350c0345068832456ee2cfea9