-
-
Notifications
You must be signed in to change notification settings - Fork 17
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: add support for oidc-provider@8
#23
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
do you plan to release this feature any soon? |
Added support for `oidc-provider@8` which became ESM-only. Support is done through dynamic import of the `oidc-provider` package as Nest does not support ESM-only packages directly, as it only compiles for CJS.
Using `new Function` was causing unexpected errors in jest tests
adrianbrs
force-pushed
the
feature/oidc-provider-v8
branch
from
September 30, 2024 06:01
28b2b19
to
097c04c
Compare
This new decorator makes it easy to retrieve the current user session from the context
This version of `oidc-provider` exports the Provider as a named export. The latest version of the `@types` package also includes the previously missing typings. BREAKING CHANGE: The `InteractionDetails` type has been renamed to `Interaction` and is now exported directly from `oidc-provider`.
adrianbrs
added
type: enhancement
New feature or request
type: deps
Pull requests that update a dependency file
type: build
labels
Oct 2, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
type: build
type: deps
Pull requests that update a dependency file
type: enhancement
New feature or request
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Currently, version 8 of
oidc-provider
is not supported as it is now ESM-only, and NestJS still does not support ESM-only packages as it builds only for CJS, generating an error [ERR_REQUIRE_ESM] when importing theoidc-provider
library.Issue Number: #22
What is the new behavior?
ESM-only versions of
oidc-provider
are now supported through dynamic imports. The only limitation is that you cannot import anything from theoidc-provider
library directly, but only through the dependency injection provided by this package.Does this PR introduce a breaking change?
Some important changes must be made for this new version to work:
oidc-provider
library must be removedoidc-provider
instance or other module exposuresOidc
namespace, and now all decorators are prefixed withOidc
, for example:@OidcContext
.InteractionDetails
type has been renamed toInteraction
and is now exported directly fromoidc-provider
.