start abstract method

Future<String> start({
  1. required OAuthProvider provider,
  2. String? redirectUrl,
  3. SignInOptions? options,
})

Starts an OAuth redirect chain to authenticate a user.

// use one of the built in constants for the OAuth provider
final authUrl = await Descope.oauth.start(provider: OAuthProvider.google);

// or pass a string with the name of a custom provider
final authUrl = await Descope.oauth.start(provider: OAuthProvider.named("myprovider"));

This function returns a URL to redirect to in order to authenticate the user against the chosen provider.

It's recommended to use flutter_web_auth to perform the authentication.

Important: Make sure a default OAuth redirect URL is configured in the Descope console, or provided by this call via redirectUrl.

Implementation

Future<String> start({required OAuthProvider provider, String? redirectUrl, SignInOptions? options});