DescopeFlowConfig.hosted constructor
DescopeFlowConfig.hosted(
- String flowId, {
- DescopeSdk? sdk,
Creates a DescopeFlowConfig with a URL built from the flow ID, for use with Descope's Flow hosting service.
Use the cascade operator to set additional options:
DescopeFlowConfig.hosted('sign-in')
..androidOAuthNativeProvider = 'google'
..iosOAuthNativeProvider = 'apple'
The optional sdk parameter can be provided to use a specific DescopeSdk instance
instead of the Descope singleton.
Implementation
factory DescopeFlowConfig.hosted(String flowId, {DescopeSdk? sdk}) {
final descope = sdk ?? globalSdk;
final baseUrl = descope.config.baseUrl ?? baseUrlForProjectId(descope.config.projectId);
return DescopeFlowConfig(url: '$baseUrl/login/${descope.config.projectId}?wide=true&platform=mobile&flow=$flowId', sdk: sdk);
}