Sign in a user through SSO
- Before you can call this method you need to establish a connection to an identity provider. Use the CLI commands to do this.
- If you've associated an email domain to the identity provider, you can use the
domain
property to start a sign-in flow. - In case you need to use a different way to start the authentication flow with an identity provider, you can use the
providerId
property. For example:- Mapping specific user email addresses with an identity provider.
- Using different hints to identify the correct identity provider, like a company-specific page, IP address or other tracking information.
Parameters
providerId
Optional
StringThe ID of the SSO provider to use for signing in.
domain
Optional
StringThe email domain to use for signing in.
redirectTo
Optional
StringThe URL to redirect the user to after they sign in with the third-party provider.
captchaToken
Optional
StringThe captcha token to be used for captcha verification.
launchMode
Optional
LaunchModeThe launch mode for the auth screen. Defaults to LaunchMode.platformDefault
.
await supabase.auth.signInWithSSO(
domain: 'company.com',
);