forIdToken static method
Implementation
static Future<Client> forIdToken(String idToken,
{http.Client? httpClient}) async {
var token = JsonWebToken.unverified(idToken);
var claims = OpenIdClaims.fromJson(token.claims.toJson());
var issuer = await Issuer.discover(claims.issuer, httpClient: httpClient);
if (!await token.verify(issuer._keyStore)) {
throw ArgumentError('Unable to verify token');
}
var clientId = claims.authorizedParty ?? claims.audience.single;
return Client(issuer, clientId, httpClient: httpClient);
}