DescopeSdk constructor
DescopeSdk(
- String projectId, [
- dynamic configure()?
Creates a new DescopeSdk.
The projectId
of the Descope project can be found in the project page in
the Descope console. Use the optional configure
function to
finely configure the Descope SDK.
Implementation
factory DescopeSdk(String projectId, [Function(DescopeConfig)? configure]) {
// init config
final config = DescopeConfig(projectId: projectId);
configure?.call(config);
// init auth methods
final client = DescopeClient(config);
return DescopeSdk._internal(config, Flow(client), Auth(client), Otp(client), Totp(client), MagicLink(client), EnchantedLink(client), OAuth(client), Sso(client), Passkey(client), Password(client));
}