SupabaseS
Supabase4y ago
enti

Session using a store or not?

I followed a guide keeping the current auth Session in a store (pinia/vue3). Obviously, I don't detect if the session ran out.
Should I avoid using a store to handle the Session, or call supabase.auth.session() anywhere I need it instead? Or should I use a getter in my store which will call for const session = supabase.auth.session() anytime I need this value / check if the user is still authenticated server side?
Was this page helpful?