Custom OIDC Providers for Supabase Auth
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.
Related posts
- Build "Sign in with Your App" using Supabase Auth
Supabase mediumAdeptSupabase 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.
- 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.
- Enterprise-managed auth for MCP: Claude can now issue the identity assertion
Supabase mediumAdeptClaude 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.
- Supabase Auth: Identity Linking, Hooks, and HaveIBeenPwned integration
Supabase mediumAdeptSupabase 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.
- Managed Better Auth is now an OAuth provider, with MCP support
Neon mediumAdept
Neon's Managed Better Auth now supports the OAuth Provider plugin, turning an auth instance into an OAuth 2.1 authorization server that both companion apps and MCP clients can use to sign users in. Neon runs the discovery endpoints, JWKS, token issuance and refresh, and client onboarding via Client ID Metadata Documents or optional dynamic registration. You host the login and consent pages and the resource server, where the new @neon/oauth SDK checks token signature, issuer and audience, with adapters for Express, Hono, Next.js and node:http. OAuth configuration is per branch, and each branch gets its own issuer while sharing signing keys, so preview-branch tokens are rejected by production verifiers that pin the issuer.