njwt icon indicating copy to clipboard operation
njwt copied to clipboard

Add Typings

Open elecompte60 opened this issue 5 years ago • 7 comments

Would be very useful if this library included Type definitions (@types/njwt apparently has not been created by a type definition contributor yet)

elecompte60 avatar Feb 10 '20 22:02 elecompte60

@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.

swiftone avatar Feb 21 '20 21:02 swiftone

Internal ref: OKTA-279231

swiftone avatar Feb 21 '20 21:02 swiftone

@swiftone any update?

iam-yan avatar Aug 08 '20 05:08 iam-yan

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.

swiftone avatar Aug 10 '20 16:08 swiftone

Is there any updates?

masonlouchart avatar Sep 27 '20 14:09 masonlouchart

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 avatar Jun 07 '21 17:06 danbulant

@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.