showAuthenticator static method
Future
showAuthenticator(
- WebAuthenticator authenticator
)
Implementation
static Future showAuthenticator(
simpleAuth.WebAuthenticator authenticator) async {
if (authenticator.redirectUrl == null) {
authenticator.onError("redirectUrl cannot be null");
return;
}
var initialUrl = await authenticator.getInitialUrl();
authenticators[authenticator.identifier!] = authenticator;
String? url = await _channel.invokeMethod("showAuthenticator", {
"initialUrl": initialUrl.toString(),
"identifier": authenticator.identifier,
"title": authenticator.title,
"allowsCancel": authenticator.allowsCancel.toString(),
"redirectUrl": authenticator.redirectUrl,
"useEmbeddedBrowser": authenticator.useEmbeddedBrowser.toString(),
"useSSO": authenticator.useSSO.toString()
});
if (url == "cancel") {
authenticator.cancel();
return;
}
}