Introducing JWT Signing Keys
Supabase Auth now supports asymmetric JWT signing keys (RSA or elliptic curve), letting apps verify tokens locally using public keys published at a JWKS endpoint instead of calling the Auth server or sharing a forgeable secret. Migration is a reversible, zero-downtime sequence: import the legacy secret, generate a standby key pair, rotate to sign with the new private key, then revoke the old secret. A new getClaims() client function verifies tokens via the Web Crypto API with cached public keys, and any JWT library such as jose works too. New publishable and secret API keys replace the JWT-based anon and service_role keys, with asymmetric keys becoming the default for new projects from October 2025 and legacy keys phased out by late 2026.
Related posts
- WTF Are JWTs?
Neon mediumAdept
JSON Web Tokens are compact, signed, self-contained tokens made of three base64url segments (header, payload of registered and custom claims, and an HMAC or RSA signature). They replaced database-backed sessions for stateless, cross-service auth. A worked Node.js example builds an HS256 token by hand, and JWKS endpoints let services fetch an auth provider's public keys by kid to verify tokens and support key rotation. In Neon RLS, verified claims such as tenant_id drive Postgres row-level security policies. JWTs are signed but not encrypted, so sensitive data should stay out of the payload or use encrypted JWTs.
- Supabase Security Retro: 2025
Supabase easyNoviceSupabase's 2025 security work centered on safer defaults around Postgres Row Level Security and API exposure. Changes include RLS enabled by default for dashboard-created tables, event triggers to enforce RLS on tables created elsewhere, and alerts plus Splinter-based Security Advisors for misconfigurations. Long-lived JWT anon/service_role keys are being replaced by publishable and revocable secret keys, with asymmetric JWT signing and automatic revocation of keys leaked to GitHub. Legacy keys will be removed in late 2026, and pg_graphql will be disabled by default on new projects. The HackerOne VDP has resolved 139 reports with a median first response of 8 hours, and paid bounties are planned for 2026.
- Supabase Auth: SSO, Mobile, and Server-side support
Supabase mediumAdeptSupabase Auth adds SAML 2.0 single sign-on, a PKCE authorization flow for server-side rendering and mobile apps, and native Sign in with Apple on iOS. SSO providers are managed with new `supabase sso` CLI commands, and the provider identifier in the JWT can drive Postgres Row Level Security policies for multi-tenant isolation. PKCE replaces the implicit grant flow, which exposed tokens in URL fragments that servers can't read and that malicious mobile apps could intercept. It does this with a hashed code verifier and challenge, so an intercepted authorization code is useless on its own. Enabling it means setting `flowType: 'pkce'` in supabase-js, and a Next.js callback route exchanges the code for a session.
- Supabase Auth now supports Anonymous Sign-ins
Supabase mediumAdeptSupabase Auth adds anonymous sign-ins, letting apps create temporary users who are treated as `authenticated` and persisted in `auth.users` with an `is_anonymous` flag exposed as a JWT claim. Postgres Row Level Security policies can check `auth.jwt() ->> 'is_anonymous'` to restrict features, such as blocking anonymous inserts or limiting reads to recent rows. Anonymous users become permanent by linking an email, phone or OAuth identity while keeping the same user ID, so their data carries over. Until automatic cleanup ships, a SQL delete on `auth.users` can purge anonymous accounts older than 30 days.
- JSON Web Keys (JWK): Rotating Cryptographic Keys at Zalando
Zalando Engineering mediumAdeptZalando's OIDC identity provider rotates its JWT signing keys automatically on a schedule, using a phased process so clients are never disrupted. A new key pair is generated and its public key is published on the JWK endpoint, with a grace period so clients can refresh cached key sets. The new key is then promoted to active signer, while the retired key stays published until every token it signed has expired. Removal time is computed as retirement time plus maximum token lifetime plus a safety margin, using the key ID embedded in each JWT.