njwt
njwt copied to clipboard
Add Typings
Would be very useful if this library included Type definitions (@types/njwt apparently has not been created by a type definition contributor yet)
@elecompte60 - Thanks for the feedback! We are adding TypeScript definitions to our repositories but we have a number of repos to update and it may take a while for this one to hit the top of the priority list.
Internal ref: OKTA-279231
@swiftone any update?
Okta (who now manages this library) has introduced typescript definitions to its okta-auth-js library. Next high level target is adding definitions to the front end SDKs that consume okta-auth-js, so I expect njwt will fall somewhere in there, but I'll poke the involved devs to see where it falls.
Is there any updates?
jwt now has typings, but for example the typings for verify are wrong (the callback doesn't get kid and callback but error: Error | undefined and data: Jwt | undefined).
@danbulant would you mind elaborating on which signature appears to be wrong? The parameters you mention (kid and callback) are passed to key resolver callback - there seem to be no verify signature in JS code expecting them.
Please also feel free to submit a PR with a suggested change.