Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TokenValidationErrorCode types do not overlap with TOKEN_ERROR_CODES from source #402

Closed
TimLehner opened this issue Nov 7, 2023 · 1 comment · Fixed by #403
Closed

Comments

@TimLehner
Copy link
Contributor

When using the library, the types and the actual values for the static property TokenError.codes have diverged.

The source includes:

  missingRequiredClaim: 'FAST_JWT_MISSING_REQUIRED_CLAIM', // A required claim is missing

Defined in [1], available as a static property on the class and exported.

This entry does not appear in the type stubs: https://github.com/nearform/fast-jwt/blob/52e94dd8ed81f61b6712fc628b748d47df3e5e6d/src/index.d.ts#L18C1-L35C33.

I would like to make a PR which realigns the type definitions, and adds unit tests to ensure these types do not diverge in future. Would this be helpful, or is there a good reason why this type hasn't been included in the type definitions?

Copy link
Contributor

🎉 This issue has been resolved in version 3.3.2 🎉

The release is available on:

Your optic bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant