Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Supabase 4 min read Announcement mediumAdept

Scope your Personal Access Tokens

Supabase Personal Access Tokens can now be scoped to specific organizations or projects, granular permissions, and an expiry of up to one year, and Dashboard-created tokens are scoped by default. A token's effective access is always bounded by the creating user's current role, so revoked user permissions immediately limit the token. Scoped tokens use the sbp_fc prefix and work with the Management API (403s list missing_permissions), the MCP server (per-tool permission checks), and the CLI via --token or SUPABASE_ACCESS_TOKEN, with caveats: SUPABASE_DB_PASSWORD bypasses token permissions and supabase link needs extra read scopes. Existing full-access tokens are labeled Legacy and keep working with no deprecation date.

Assumes: API bearer tokensSupabase basics

Related posts

  • Build "Sign in with Your App" using Supabase Auth

    Supabase mediumAdept

    Supabase Auth can now act as an OAuth 2.1 and OpenID Connect identity provider, letting a project offer "Sign in with [Your App]" to third-party apps, MCP-based AI agents, partner integrations and enterprise SSO. It uses the authorization code flow with PKCE, issues JWT access tokens carrying a client_id claim alongside the usual user_id and role, and also provides ID tokens, a UserInfo endpoint, refresh tokens, a JWKS endpoint and discovery documents at /.well-known/oauth-authorization-server and /.well-known/openid-configuration. MCP clients can register themselves through dynamic client registration. Existing login methods, Custom Access Token Hooks and Row Level Security all apply to OAuth tokens, so RLS policies can limit each client to specific data by checking the client_id claim. Granular scopes are planned but not yet available.

  • Enterprise-managed auth for MCP: Claude can now issue the identity assertion

    Supabase mediumAdept

    Claude can now act as the issuer of the signed ID-JAG (Identity Assertion JWT Authorization Grant) for the Supabase MCP server, enabling enterprise-managed authorization for organizations whose identity provider doesn't support the MCP Enterprise-Managed Authorization extension (previously effectively only Okta). Claude verifies Claude-org membership and account email before signing, and Supabase checks the signature against the registered issuer, a matching SSO identity, and admin approval before minting a short-lived member-bound access token. The tradeoffs are significant: Claude does not check IdP sign-in or MFA, disabling a user in the IdP no longer revokes access (remove them from both Supabase and Claude orgs), and registering Claude's issuer URL replaces the IdP's, breaking managed auth for other AI tools relying on it.

  • Automatic CLI login

    Supabase mediumAdept

    Supabase CLI 1.114.0 replaces the manual copy-paste token flow with a browser-based automatic login. `supabase login` generates a session UUID, a token name and an ephemeral P-256 ECDH key pair, then opens a dashboard URL carrying the public key. The Management API mints an access token, encrypts it with an ECDH-derived shared secret using its own one-time key pair, and stores only the ciphertext. The CLI polls by session ID, decrypts the token with its in-memory private key and saves it to the OS keychain, while flags still allow manual tokens, environment variables or no browser.

  • Custom OIDC Providers for Supabase Auth

    Supabase mediumAdept

    Supabase Auth now supports connecting any standards-compliant OpenID Connect identity provider, beyond its 20+ built-in social logins, for cases like regional compliance IdPs, self-hosted GitHub Enterprise or GitLab, and niche SSO systems. Providers are configured with an issuer URL, client credentials and scopes via the Admin API or Dashboard, with discovery and JWKS resolved from the .well-known endpoint and ID tokens verified automatically. Sign-in uses the same signInWithOAuth flow with a custom: identifier, and features include server-side PKCE by default, extra authorization params, multiple acceptable client IDs for multi-platform apps, and email-optional sign-in. Projects are limited to 3 custom providers unless support raises the cap.

  • Supabase Auth: Identity Linking, Hooks, and HaveIBeenPwned integration

    Supabase mediumAdept

    Supabase Auth adds four features: manual Identity Linking via linkIdentity()/unlinkIdentity() for OAuth identities, session controls (time-boxed sessions, inactivity timeouts, single session per user on Pro and above), leaked password protection using the HaveIBeenPwned Pwned Passwords API with configurable password requirements, and Auth Hooks. Auth Hooks are Postgres functions that run synchronously at points such as access token generation, MFA verification and password verification, so they can add custom JWT claims or enforce custom security rules. Webhook-based hooks via Standard Webhooks are planned for Q1 2024. The GoTrue fork is also being renamed to Auth, with no breaking changes.

The quest for software engineering knowledge.

Look:
Layout: