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

jwt module shoud extends ConfigurableModuleClass #1064

Closed
2 of 4 tasks
floross opened this issue Aug 26, 2022 · 1 comment
Closed
2 of 4 tasks

jwt module shoud extends ConfigurableModuleClass #1064

floross opened this issue Aug 26, 2022 · 1 comment
Labels
bug Something isn't working needs triage

Comments

@floross
Copy link

floross commented Aug 26, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Current behavior

JwtModule does not use the nestjs v9 ModuleOptionsBuilder. That said we cannot use the providers from the parent module when we want to pass the options from a parent module (as describe here: nestjs/nest#9935).

Minimum reproduction code

nestjs/nest#9935

Steps to reproduce

Try to use this kind of configuration described in the merged pull request.

         JwtModule.registerAsync({
          useFactory(opt: AuthenticationOptions) {
            return opt.jwtOptions;
          },
          inject: [AuthenticationOptions],
        }),

When using this code we cannot inject JwtService in our service from our parent module

Expected behavior

Allow provideInjectionTokensFrom to be able to use the config providers from a parent module

Package version

9.0.0

NestJS version

9.0.11

Node.js version

16.15.1

In which operating systems have you tested?

  • macOS
  • Windows
  • Linux

Other

No response

@floross floross added bug Something isn't working needs triage labels Aug 26, 2022
@floross floross changed the title jwt module shoud jwt module shoud extends ConfigurableModuleClass Aug 26, 2022
@kamilmysliwiec
Copy link
Member

Let's track this here #1065

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants