verifySessionCookie method

Future<DecodedIdToken> verifySessionCookie(
  1. String sessionCookie, {
  2. bool checkRevoked = false,
})
inherited

Implementation

Future<DecodedIdToken> verifySessionCookie(
  String sessionCookie, {
  bool checkRevoked = false,
}) async {
  final isEmulator = app.isUsingEmulator;
  final decodedIdToken = await _sessionCookieVerifier.verifyJWT(
    sessionCookie,
    isEmulator: isEmulator,
  );

  if (checkRevoked || isEmulator) {
    return _verifyDecodedJWTNotRevokedOrDisabled(
      decodedIdToken,
      AuthClientErrorCode.sessionCookieRevoked,
    );
  }

  return decodedIdToken;
}