Category: Supabase and databases

Supabase Auth: Logout does not close other sessions

Read this guide in Polish

After logging out the phone, the session on the second device still has access for a while.

How to identify the source of the problem

Check the scope of the signOut method used and the role of access tokens and fresh tokens.

Compare the result for the authorized and unauthorised user, project name and exact error code.

Repair steps

If you require global logging out, use the correct view and separate server control for sensitive operations.

How to Test Solution

After the access expires, other sessions cannot renew it, and new login requires authorization.

Security and restrictions

Change permissions and scheme first on test data with backup. Do not put service role in your browser.