internalFinishAuthentication method

Future<UserInfo> internalFinishAuthentication({
  1. required Uri url,
  2. required String redirectURI,
  3. required CodeVerifier codeVerifier,
})

Implementation

Future<UserInfo> internalFinishAuthentication({
  required Uri url,
  required String redirectURI,
  required CodeVerifier codeVerifier,
}) async {
  final xDeviceInfo = await _getXDeviceInfo();
  final tokenResponse = await _exchangeCode(
    url: url,
    redirectURI: redirectURI,
    codeVerifier: codeVerifier,
    xDeviceInfo: xDeviceInfo,
  );
  await _persistTokenResponse(
      tokenResponse, SessionStateChangeReason.authenticated);
  await disableBiometric();
  final userInfo = await _apiClient.getUserInfo();
  return userInfo;
}