1
Persist session
Source: supabase/supabase#40283 · opened by @eduardoagr
I've been working with Supabase in a .NET MAUI project and ran into a major limitation: there's no clean way to restore a session after app restart using stored access and refresh tokens. The CurrentSession property is read-only, and the SDK doesn’t expose a method to hydrate the session manually. This forces developers to either: • Re-authenticate using email and password (which means storing credentials — a security risk), or • Try to use RefreshSession(), which only works if CurrentSession is already populated — which it isn’t after restart. Firebase’s SDK solves this with a UserRepository abstraction and observable auth state. Supabase could offer something similar — maybe a method like SetSession(accessToken, refreshToken) or a way to initialize the session from stored tokens. This would make Supabase much more usable in mobile and desktop apps where persistent login is expected. I’ve searched for similar discussions and didn’t find one that directly a…
No pledges yet. Be the first to back this.
Comments
Similar requests
Add autoRefresh Option to getUser() to Ensure Session Data is Synced with Latest User State
3 votes · 0 comments
Automatically Logout users in cases when persistSession is false and the user closes the browser window
1 vote · 0 comments
Better debug behaviour: a single debug session for all calls (I tried `policy: "per-worker"` and it did not do that)
1 vote · 0 comments
Accept `auth` options passed to `createPagesServerClient`
1 vote · 0 comments
customize session time box by each flow (short lived session for B2B2C apps)
3 votes · 0 comments
No comments yet.