Automatic CLI login
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.
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.
- Supabase Flutter SDK 1.0 Developer Preview
Supabase mediumAdeptSupabase Flutter SDK 1.0 enters developer preview with a focus on developer experience. Auth state persistence and deep link handling now happen automatically on initialization, replacing the removed SupabaseAuthState and SupabaseAuthRequiredState classes. Errors are now thrown instead of returned, since Dart lacks destructuring, and `.execute()` is deprecated so queries resolve directly to data. Deep links now work on macOS and Windows through app_links, Multiplayer realtime support is planned for the stable release, and a new Supabase Auth UI package provides prebuilt email, magic link and social login widgets.
- Custom OIDC Providers for Supabase Auth
Supabase mediumAdeptSupabase 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 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.