nuxt-modules / supabase

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

User and session are fetch each time we're focusing the tab #163

Closed larbish closed 1 year ago

casio commented 1 year ago

Actually, both requests - POST /session and GET /user - are dispatched twice on each focus event. When logged in, you can see this on the demo: https://n3-supabase.netlify.app/

(which is having its auth callback URL set to http://localhost:3000 currently I believe, so users currently cannot login)

j4w8n commented 1 year ago

Likely due to gotrue-js behavior. There is a PR to stop emitting SIGNED_IN events on tab focus.