Techofficer / node-apple-signin

Node.JS wrapper around Sign In with Apple REST API
MIT License
53 stars 40 forks source link

fix: await jwt verify as it returns promise instead of claim #1

Closed kwoodwardizi closed 3 years ago

kwoodwardizi commented 4 years ago

Hey, had an issue with this function returning undefined so I logged some stuff out and saw that this line was returning a promise - added an await and it took care of it 👍

tamas-pap commented 4 years ago

@kwoodwardizi

If a callback is not supplied, function acts synchronously. Returns the payload decoded if the signature is valid and optional expiration, audience, or issuer are valid. If not, it will throw the error.

https://www.npmjs.com/package/jsonwebtoken#jwtverifytoken-secretorpublickey-options-callback