jwt icon indicating copy to clipboard operation
jwt copied to clipboard

feat(): support for asynchronous version of `secretOrKeyProvider`

Open den-khv opened this issue 3 years ago • 1 comments

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] The commit message follows our guidelines: https://github.com/nestjs/nest/blob/master/CONTRIBUTING.md
  • [x] Tests for the changes have been added (for bug fixes / features)
  • [x] Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

[ ] Bugfix
[x] 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: #235

What is the new behavior?

Allow ability to provide an asynchronous version of secretOrKeyProvider. However, when using asynchronous verison of secretOrKeyProvider, synchronous versions of .sing and .verify will log a warning message and throw an exception before calling .sing or .verify.

Does this PR introduce a breaking change?

[ ] Yes
[x] No

Other information

I'm not sure if this PR contains breaking changes, because synchronous versions of .sing and .verify can throw exceptions as well.

den-khv avatar Nov 18 '20 13:11 den-khv

Why is this LGTY? Sure there're some points that could be improved, but maybe you elaborate what your points are? I could jump in and fix this.

baflo avatar Jun 21 '21 13:06 baflo

I have resolved the conflicts and updates the sing typos in #1486. This feature is required to handle jwks key rotations.

xzyfer avatar Nov 08 '23 02:11 xzyfer

@kamilmysliwiec did you mean to close the issue #235 or this stale PR?

xzyfer avatar Nov 09 '23 03:11 xzyfer

Let's track this here https://github.com/nestjs/jwt/pull/1486

kamilmysliwiec avatar Nov 09 '23 07:11 kamilmysliwiec