How to choose between VerifyIDToken and GetTypedClaims
masterThe method you use to process an ID token depends on its source:
- From a Client Device (iOS app or Web browser): Use
VerifyIDToken. Because the token passed through the client, you must verify its RS256 signature to ensure it hasn't been tampered with. This method fetches Apple's public JWKS and validatesiss,aud, andexp. - From Apple's API Response: Use
GetTypedClaims. When your server callsVerifyAppTokenorVerifyWebToken, Apple returns theid_tokendirectly over TLS. Since the token never touched the client, signature verification is redundant.GetTypedClaimsis more efficient and handles Apple's legacy string-basedemail_verifiedformat.