© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•2mo ago•
3 replies
Sabarish

Supabase Unity Email OTP Session Expiry

auth
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
SupabaseUnitySessionProvider.cs804B
SupabaseManager.cs6.99KB
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

OTP expiry settings
SupabaseSSupabase / help-and-questions
12mo ago
Supabase Register with Email OTP Verification
SupabaseSSupabase / help-and-questions
6mo ago
HTTP Auth hooks otp verification expiry
SupabaseSSupabase / help-and-questions
2y ago
email otp limit
SupabaseSSupabase / help-and-questions
6mo ago