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

Feature(export): exports jsonwebtoken errors to allow using them with… #1438

Merged
merged 1 commit into from Nov 9, 2023

Conversation

Najtu
Copy link
Contributor

@Najtu Najtu commented Sep 14, 2023

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #1437

What is the new behavior?

To allow usage of "instanceof" the jsonwebtoken package version must match the jsonwebtoken version in @nestjs/jwt.

This exposes TokenExpiredError, NotBeforeError, JsonWebTokenError from @nest/jwt to be used with instanceof

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@Najtu
Copy link
Contributor Author

Najtu commented Sep 15, 2023

@kamilmysliwiec if you feel like anything should be changed or adapted let me know I'll gladly adapt. Also I didn't adapt the README, but I think if we go forward with this feature we should mention in the README that we expose those errors for people awareness.

@kamilmysliwiec
Copy link
Member

lgtm

@kamilmysliwiec kamilmysliwiec merged commit 19cbebc into nestjs:master Nov 9, 2023
1 check passed
@kamilmysliwiec kamilmysliwiec added the enhancement New feature or request label Nov 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants