Category: Supabase and databases

Supabase Auth: anonymous user sees ordinary account resources

Read this guide in Polish

The application treats an anonymously logged account as a full authenticated account.

How to identify the source of the problem

Check session type, claim is anonymous and RLS policy for objects requiring a permanent account.

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

Repair steps

Match the policies to the account type and implement the conversion of the anonymous session to full.

How to Test Solution

A temporary account does not read your personal data with full verification.

Security and restrictions

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