authenticate method
Implementation
Future<UserInfo> authenticate({
required String redirectURI,
List<PromptOption>? prompt,
List<String>? uiLocales,
ColorScheme? colorScheme,
AuthenticationPage? page,
String? oauthProviderAlias,
String? wechatRedirectURI,
String? authenticationFlowGroup,
}) async {
final authRequest =
await internalCreateAuthenticateRequest(AuthenticateOptions(
redirectURI: redirectURI,
isSsoEnabled: isSsoEnabled,
preAuthenticatedURLEnabled: preAuthenticatedURLEnabled,
state: null,
prompt: prompt,
uiLocales: uiLocales,
colorScheme: colorScheme,
oauthProviderAlias: oauthProviderAlias,
wechatRedirectURI: wechatRedirectURI,
page: page,
authenticationFlowGroup: authenticationFlowGroup,
));
if (wechatRedirectURI != null) {
await native.registerWechatRedirectURI(
onWechatRedirectURI: _onWechatRedirectURI,
wechatRedirectURI: wechatRedirectURI);
}
final resultURL = await _uiImplementation.openAuthorizationURL(
url: authRequest.url.toString(),
redirectURI: authRequest.redirectURI,
shareCookiesWithDeviceBrowser: isSsoEnabled,
);
return await internalFinishAuthentication(
url: Uri.parse(resultURL),
redirectURI: redirectURI,
codeVerifier: authRequest.verifier);
}