arrow_backAll termssecurity

Supabase Anon Key

The Supabase Anon Key is a public, client-side safe API key for your Supabase project. It requires Row Level Security (RLS) to enforce data access rules.

Also available: Auf Deutsch

The Supabase Anon Key (also known as the 'public' or 'anon' key) is an API key designed to be safely exposed in client-side code, such as your web browser or mobile application. It grants anonymous access to your Supabase project's API endpoints, allowing unauthenticated users to interact with your database and authentication services.

Because it's publicly exposed, the Anon Key relies heavily on Row Level Security (RLS) policies in your PostgreSQL database to prevent unauthorized data access. Without robust RLS policies in place, exposing the Anon Key would allow anyone to read or write any data in your database. For example, if you have a public blog post table, you might allow anonymous users to read posts, but only authenticated users to create new ones, all enforced by RLS.

When a user authenticates, the Anon Key is typically exchanged for a user-specific JWT (JSON Web Token), which then allows RLS policies to apply rules based on the authenticated user's ID and roles. This makes the Anon Key a foundational element for building secure, client-driven applications with Supabase, as long as RLS is correctly configured.

Related terms

Audit your site on all of these?

Pantra scans you in 8 seconds. Free, no signup.

Scan my sitearrow_forward