Skip to content

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

2 participants