lupidan / apple-signin-unity

Unity plugin to support Sign In With Apple Id
MIT License
598 stars 85 forks source link

Token validation on server failed due to Apple public auth keys updated #146

Closed thinh-ng closed 2 years ago

thinh-ng commented 2 years ago

We used version 1.1.0 of this package and the generated identity token failed to be validated on our server with the message

IDX10501: Signature validation failed. Unable to match key: 
kid: 'System.String'.
Exceptions caught:
 'System.Text.StringBuilder'. 
token: 'System.IdentityModel.Tokens.Jwt.JwtSecurityToken'.

The key from Apple auth/keys resulted in these 3 kid: fh6Bs8C, W6WcOKB and YuyXoY mean while the kid of the identity token is 86D88Kf and eXaunmL

It seem like auth/keys just updated to those new ones, since before April 2022 I don't have any issue validating the token

Is later version support the new kid? or it is not supported yet?