Instance Method
verify(_:as:expectedAudience:trustedAdditionalAudiences:trustedAuthorizedPresenters:iteratingKeys:)
Verifies a Google identity token and additionally restricts its
azp claim.func verify(_ token: String, as _: GoogleIdentityToken.Type = GoogleIdentityToken.self, expectedAudience: String, trustedAdditionalAudiences: Set<String> = [], trustedAuthorizedPresenters: Set<String>, iteratingKeys: Bool = false) async throws -> GoogleIdentityToken
Discussion
Google can issue a token with a server client ID in aud and a mobile client ID in azp. Include that mobile ID in trustedAuthorizedPresenters when opting in to this check. An empty set accepts only expectedAudience.