Hi ,
I’m using Supabase Auth with Unity (C# latest Dll) and running into a session persistence issue with Email OTP.
1.Email OTP login works correctly
2.VerifyOTP() succeeds
3.Session is created
4.App works normally at runtime
5.Session is saved using a custom IGotrueSessionPersistence<Session> (PlayerPrefs)
6.Session is restored on app restart using
await Supa.InitializeAsync();
Supa.Auth.LoadSession();
Issue :
After 1 hour, the session becomes invalid and I get "session not active"
What I’m trying to achieve :
Keep users logged in for 30 days
Supabase Dashboard → Time-box user sessions = 720 hours
From my understanding, when the access token expires (~1 hour), Supabase should automatically issue a new access token using the refresh token, keeping the session active until the 30-day limit.
Questions:
1. Is the refresh token expected to automatically refresh the access token in Unity / supabase-csharp?
Or do we need to manually trigger the refresh (for example, by calling an auth/session method on resume or activity)?
2. How to achieve my expected behavior.
I’ve attached my Unity code below.
If I’m missing any required step or using the SDK incorrectly, please let me know