SupabaseS
Supabase5d ago
Viv

Authentication persistence - how does it work?

I want users to remain logged in when they background and reopen my Flutter app.

Currently, I sign users in with:
await locator<SupabaseClient>()
          .auth
          .signInWithPassword(email: email, password: password);



However, when the app is backgrounded and reopened, the user is logged out.
Calling currentSession() returns null, and refreshing the session also returns null with the same behavior. I'm also on the pro plan

How is authentication persistence supposed to work in Supabase with Flutter?
What setup is required to ensure the session is restored correctly when the app resumes?
Was this page helpful?