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

feat(): support for asynchronous version of secretOrKeyProvider #1486

Merged
merged 1 commit into from Nov 9, 2023
Merged

feat(): support for asynchronous version of secretOrKeyProvider #1486

merged 1 commit into from Nov 9, 2023

Conversation

xzyfer
Copy link
Contributor

@xzyfer xzyfer commented Nov 8, 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: #235

What is the new behavior?

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

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

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

This PR is an updated version of #469 with conflicts resolved and typos fixed.

@xzyfer
Copy link
Contributor Author

xzyfer commented Nov 9, 2023

@kamilmysliwiec how likely are we to see progress on this given the original issue #235 been closed and the last submitted PR sat dormant for over 2.5 years?

I ask as this missing capability is a problematic us and anyone needing JWKS support like Auth0 users.

@kamilmysliwiec kamilmysliwiec merged commit 5c1050e into nestjs:master Nov 9, 2023
1 check passed
@kamilmysliwiec
Copy link
Member

lgtm

@kamilmysliwiec kamilmysliwiec added the enhancement New feature or request label Nov 9, 2023
@xzyfer xzyfer deleted the async-secret-or-key-provider branch November 9, 2023 22:25
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