Flutter: createProvider

Creates a new custom OIDC/OAuth provider. For OIDC providers, the server fetches and validates the discovery document at creation time and throws an AuthException with code validation_failed if it is unreachable or invalid.

Parameters

Examples

Create a custom provider

final CustomOAuthProvider provider =
    await supabase.auth.admin.customProviders.createProvider(
  CreateCustomProviderParams(
    providerType: CustomProviderType.oidc,
    identifier: 'custom:mycompany',
    name: 'My Company',
    clientId: 'client-id',
    clientSecret: 'client-secret',
    issuer: 'https://auth.mycompany.com',
    customClaimsAllowlist: ['groups', 'org_id'],
  ),
);