Getting started with Flutter authentication
Google sign-in for a Flutter app works by using the google_sign_in package to obtain an OIDC ID token and access token. Those tokens are passed to Supabase Auth's signInWithIdToken, which creates a session and copies the token's claims into the user metadata. Setup requires iOS, Android and web OAuth client IDs from Google Cloud, with the web client ID registered in Supabase. iOS also needs a reversed client ID URL scheme in Info.plist, and 'Skip nonce checks' must be enabled because the iOS Google sign-in package cannot supply a nonce. The sample app has a login screen that listens for auth state changes and a profile screen that shows the avatar_url and full_name from the user metadata.
Related posts
- Securing your Flutter apps with Multi-Factor Authentication
Supabase mediumAdeptA Flutter app can require TOTP-based multi-factor authentication on top of email/password sign-in using Supabase Auth. The walkthrough covers setting up supabase_flutter and go_router, configuring iOS and Android deep links for email confirmation callbacks, and building signup, enrollment and login-verification pages. Enrollment calls mfa.enroll() to get a QR code and secret, then runs mfa.challenge() and mfa.verify() with the 6-digit code and refreshes the session. Login follows signInWithPassword() with a verification step before the user can reach protected content.
- GitHub OAuth in your Python Flask app
Supabase mediumAdeptAdding GitHub OAuth login to a Flask app with supabase-py comes down to three pieces: a custom FlaskSessionStorage class that extends gotrue's SyncSupportedStorage so the JWT session lives in Flask's session, a per-request Supabase client stored on Flask's g object with flow_type set to PKCE for server-side OAuth handling, and two routes. The sign-in route calls sign_in_with_oauth with a redirect_to callback URL, and the callback route exchanges the returned code for a session.
- 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 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.