authenticate method

Future<UserInfo> authenticate({
  1. required String redirectURI,
  2. List<PromptOption>? prompt,
  3. List<String>? uiLocales,
  4. ColorScheme? colorScheme,
  5. AuthenticationPage? page,
  6. String? oauthProviderAlias,
  7. String? wechatRedirectURI,
  8. String? authenticationFlowGroup,
})

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,
    ),
  );

  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,
  );
}