Open remithomas opened 2 years ago
i had the same thing, but i got error 500
Hi @remithomas. Sorry for the late reply!
What version of oidc-provider
and nest-oidc-provider
are you using?
This warning message means that you parsed the body before the request reached the provider controller, but I tried and failed to reproduce this warning message with this repo's example project. If you can provide me with a simple reproduction code that shows this warning message I can have a better look
The versions are:
oidc-provider
: 7.14.0
nest-oidc-provider
: 1.1.1
It is setup like this:
// app.module.ts
@Module({
imports: [
OidcModule.forRootAsync({
imports: [ConfigModule],
useFactory: async (dbService: DataSource, configService: ConfigService) => {
const oidc = await getOidcProviderConfiguration(dbService, configService);
return {
issuer: configService.get<string>('ISSUER'),
path: '/oidc',
proxy: true,
oidc,
};
},
inject: [DataSource, ConfigService],
}),
],
controllers: [],
providers: [],
})
export class AppModule {}
I will create a repo to help you
Is there an existing issue for this?
Current behavior
I'm getting this warning
oidc-provider WARNING: already parsed request body detected, having upstream middleware parser is not recommended, resolving to use req.body or request.body instead
when doing a client_credentials token request (
/oidc/token
)Minimum reproduction code
No response
Steps to reproduce
No response
Expected behavior
How can I avoid this warning ? It should be handled by the module or a configuration path ?
Package
oidc-provider
nest-oidc-provider
Other package
No response
NestJS version
9.0.11
Packages versions
Node.js version
16.15.1
In which operating systems have you tested?
Other
No response