twogate / cordova-plugin-sign-in-with-apple

A native-implemented plugin of Sign in with Apple // Thanks to your contribution! // Cordova>=8 iOS>=13
https://www.npmjs.com/package/cordova-plugin-sign-in-with-apple
MIT License
74 stars 48 forks source link

Invalid signature #19

Closed doender closed 4 years ago

doender commented 4 years ago

Hi,

When I use the plugin I correctly get the user id and id token etc. However, when I parse the token here: https://jwt.io, I always get an 'Invalid signature' error, although the claims in the JWT are correct. Any idea what could be wrong?

leogoesger commented 4 years ago

+1

leogoesger commented 4 years ago

Solved it with this. The reason is because auth/keys return multiple keys, I have to find out the kid from the token header, then use the correct key.

https://developer.apple.com/forums/thread/129047