How do I implement "Remember Me" functionality? My...
# javascript
u
How do I implement "Remember Me" functionality? My thought was to use sessionStorage instead of localStorage but how do I point supabase there? (Using nextjs/react if that matters)
c
Currently, Supabase.JS supports only 2 options for storing the JWT - in memory (i.e. it is lost after a page refresh) or localStorage (which is essentially "Remember Me" since it persists across refreshes and browser close/open)
You control this via the persistSession parameter passed to the SupabaseClient constructor
unfortunately, currently you would need to re-initialize supabase if you want to switch from one to the other
There is an open issue currently about adding this functionality to the UI library: