Short answer
Each Supabase refresh token can be exchanged only once, for a new access and refresh token pair. Reuse is allowed within a 10-second interval by default, or when the parent of the active token is used; otherwise Supabase treats the whole session as terminated and revokes all its refresh tokens. Look for two places refreshing with the same token, such as the server and the browser, or an app restoring an older saved session.
Why the session ends, and the fix
01
A refresh token used twice ended the session
“the whole session is regarded as terminated and all refresh tokens belonging to it are marked as revoked.” Supabase, User sessions
Supabase allows reuse within a short interval, 10 seconds by default, and returns the active token if the parent of the current one is used. Any other reuse ends that user’s session. We look for two parts of the app refreshing with the same token.
02
The server and the browser both refresh
“Using server-side rendering where the same refresh token needs to be reused on the server and soon after on the client” Supabase, User sessions
Supabase built the reuse interval for this case. If the browser later refreshes with a token the server already exchanged, after the interval, the session ends. We check that whatever refreshes on the server writes the new tokens back to the cookie.
03
The client retries with a token it already spent
“and the response wasn't received and processed by the client, when the client comes back online, it will attempt to use the refresh token that was already used.” Supabase, User sessions
Supabase describes a client that refreshed but never got the response, then comes back online and tries the old token again; outside the reuse interval that can end the session. We also check apps that store the session themselves, for example in a mobile app’s secure storage, so they always save the latest one.
Checked against the vendor’s docs on : Supabase docs: User sessions.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
- from $450AI-Built App RescueA Lovable, Bolt or Cursor app checked end to end in 3 days, then its worst problems fixed at a fixed price.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way.See scope and start
Related: Supabase logs users out on page refresh · Supabase auth emails link to localhost · Supabase new row violates row-level security · Supabase public storage bucket