Closed alexlindsay closed 3 years ago
Thanks for the heads up. I also just needed to configure that. I've directly used the global option after running into the issue where I've only configured the client.
require('openid-client').custom.setHttpOptionsDefaults({
agent: {
http: new HttpProxyAgent(agentOpts),
https: new HttpsProxyAgent(agentOpts)
}
})
Changing Issuer class options does not affect client instance options. You're using a granular control setting rather than a global one.
https://github.com/panva/node-openid-client/blob/main/docs/README.md#customizing
Behaves as expected.
Describe the bug I'm able to set up my issuer with our proxy agent and get the client after the "discover" call, but when the issuer client calls the callback method with my oidc redirect url I get an error as follows:
RequestError: Timeout awaiting 'request' for 3500ms
I've tried changing the timeout of our issuer's options but it always stays at 3500ms. It seems our issuer client isn't calling through our proxy as intended.
To Reproduce NOTE: variable values have been purposefully omitted ` Issuer[custom.http_options] = function(options) { options.agent = { https: new HttpsProxyAgent({ proxy: proxyUrl }) }
return options; };
return Issuer.discover(discoverUrl) .then(issuer => { const issuerClient = new issuer.Client({ client_id: clientId, client_secret: clientSecret, token_endpoint_auth_method: 'client_secret_post', response_types: ['code'], redirect_uris: [ redirectUrl ], });
`
Steps to reproduce the behaviour:
Expected behaviour Callback to return oidc values
Environment:
Additional context Add any other context about the problem here.