Short answer
When this code comes back, clear the local session with signOut and scope local, then show the sign-in screen. Then find what ended the session: a global sign-out on another device, a session limit in the Auth settings, or an admin or script that deleted sessions.
Rather not fix it yourself? App Fix Ticket starts with a fixed-price diagnosis, then a fixed price for the fix before any fix work.
Why the session is gone, and the fix
01
The user signed out somewhere else
“Session to which the API request relates no longer exists.” Supabase docs, Auth error codes (session_not_found)
signOut ends every session for the user by default, so other tabs and devices get session_not_found at their next request. Use scope local when only this device should sign out.
// Sign out on this device only await supabase.auth.signOut({ scope: 'local' });02
A session limit ended it
On Pro plans and up, time-boxed sessions, an inactivity timeout or single session per user in the Auth settings end sessions on the server, checked at the next refresh. Check those settings if users are signed out on a schedule.
03
An admin or script deleted the session
“This can occur if the user has signed out, or the session entry in the database was deleted in some other way.” Supabase docs, Auth error codes (session_not_found)
Deleting rows from auth.sessions, or deleting the user, removes the session the app still holds. Sign the user out locally and let them sign in again.
04
The app keeps retrying with the old tokens
Also check: a server or middleware that reads an old auth cookie keeps failing. Clear the cookie on this code instead of retrying.
Checked against the vendor’s docs on : Supabase docs: Auth error codes; Supabase docs: User sessions; Supabase reference: signOut (scope).
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. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Supabase users logged out (refresh token) · Supabase Auth session missing · Supabase session lost on refresh · Supabase Storage bucket not found