panva / openid-client

OAuth 2 / OpenID Connect Client API for JavaScript Runtimes
MIT License
1.83k stars 392 forks source link

upgrading package openid-client from 4.7.4 to 5.1.8 getting ‘unable to get local issuer certificate’ #527

Closed piyushSinghalDemo closed 2 years ago

piyushSinghalDemo commented 2 years ago

Describe the bug

I am trying upgrade openid-client from 4.7.4 to 5.1.8 and oidc-provider from 6.31.0 to 7.11.5 . In initial call when i do issuer configuration call it throows error ‘unable to get local issuer certificate’. In our nestjs application we were doing below cerficate configuration

To Reproduce Issuer and Client configuration: (inline or gist) - Don't forget to redact your secrets. const { Issuer, generators, custom } = require('openid-client'); async onModuleInit() { let options: any = { rejectUnauthorized: false, } options.ca = fs.readFileSync(CA_PATH); custom.setHttpOptionsDefaults(options); }

// Issuer configuration (issuer.metadata) and how it is constructed (discovery or manual?)
{
  // ...
}
// Client configuration (client.metadata) and how it is constructed (fromUri or manual?)
{
  // ...
}

Steps to reproduce the behaviour:

Expected behaviour Previous certification configuration may be working in new version also

Environment:

Additional context Add any other context about the problem here.

panva commented 2 years ago

Please open a more complete, comprehensive report.

It's unlikely this is a bug so a Q&A discussion is more appropriate.

For you to get help you must provide easy and clear steps to reproduce your issue. An error message without a stack trace is also quite meaningless.