C#: Sign in a user through SSO
Signs in a user through enterprise single sign-on (SSO).
- Before you can use SSO, register your identity provider with the Supabase CLI.
- You can sign in either by email domain or by the provider's ID (a
Guid).
- The call returns a URL. Redirect the user to it to complete sign-in with their identity provider.
Examples
Sign in with an email domain
var response = await supabase.Auth.SignInWithSSO("acme.com");
// Redirect the user to complete sign-in.
var ssoUrl = response.Uri;
Sign in with a provider ID
var response = await supabase.Auth.SignInWithSSO(providerId);
var ssoUrl = response.Uri;