You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As it is explained in the doc, useSupabaseAuthClient is dedicated to authentification purpose only. It won't be recreate if your token expires, it is used in the client plugin to listen to onAuthStateChange events. If you want to fetch data from the db, use the useSupabaseClient instead. You can dig into the code (composables and plugins folder) to understand how it works.
I did dig through the code and it's still not completely clear what/why is happening with the session being shared between the server and frontend supabaseClients.
From the outside it is quite confusing that both composables are returning different instances of the supabaseClient, and the docs don't do a sufficient job at explaining why.
Thank you for your feedback. I'v made the choice to create the useSupabaseAuthClient in order to fix the #114 issue while keeping client and server session/user synced. I'd be really pleased if you find a more appropriate way to handle it. Feel free to propose something in a PR, I'll be happy to review !
What is the difference between these? They seem to return the same client with the same options?
The text was updated successfully, but these errors were encountered: