verifyJWT method

Future<DecodedIdToken> verifyJWT(
  1. String jwtToken, {
  2. bool isEmulator = false,
})

Implementation

Future<DecodedIdToken> verifyJWT(
  String jwtToken, {
  bool isEmulator = false,
}) async {
  final decoded = await _decodeAndVerify(
    jwtToken,
    projectId: app.projectId,
    isEmulator: isEmulator,
  );

  final decodedIdToken = DecodedIdToken.fromMap(decoded.payload);
  decodedIdToken.uid = decodedIdToken.sub;
  return decodedIdToken;
}