create static method
Future<WebAuthenticationSession>
create({
- required WebUri url,
- String? callbackURLScheme,
- WebAuthenticationSessionCompletionHandler? onComplete,
- WebAuthenticationSessionSettings? initialSettings,
Used to create and initialize a session.
url
represents a URL with the http
or https
scheme pointing to the authentication webpage.
callbackURLScheme
represents the custom URL scheme that the app expects in the callback URL.
onComplete
represents a completion handler the session calls when it completes successfully, or when the user cancels the session.
initialSettings
represents initial settings.
Implementation
static Future<WebAuthenticationSession> create(
{required WebUri url,
String? callbackURLScheme,
WebAuthenticationSessionCompletionHandler onComplete,
WebAuthenticationSessionSettings? initialSettings}) async {
return WebAuthenticationSession.fromPlatform(
platform: await PlatformWebAuthenticationSession.static().create(
url: url,
callbackURLScheme: callbackURLScheme,
onComplete: onComplete,
initialSettings: initialSettings));
}