Comments (7)
I got this issue too.
from node-openid-client.
Whoa, what's the response time of these APIs? Anyway, openid-client has a timeout on calls set to 1500ms, you can change this configuration like so. If the APIs are unreliable you may also wanna enable retries > see the underlying got library mentioned in the docs and let me know if this fixes your issue. I don't see what else could ;)
from node-openid-client.
Thank you for your response. We tried with below settings
b2cIssuer.defaultHttpOptions = { retries: 5, timeout: 10000 }; console.log('httpOptions %j', b2cIssuer.defaultHttpOptions);
But still we are getting the same issue :-(
{"code":"ESOCKETTIMEDOUT","message":"Socket timed out on request to login.microsoftonline.com","host":"login.microsoftonline.com","hostname":"login.microsoftonline.com","method":"POST","path":"/tfp/tenantazureb2c.onmicrosoft.com/b2c_1_sign_in/oauth2/v2.0/token"}
Your library depend on got library to make requests to the server is these httpoption settings will work for that? As I seen it not even wait for that much time and even I don't think it re-trying after we set those options.
from node-openid-client.
Yes, all http requests done by the library use these options with the got library. The got library in turn uses node's http/s module, from which this error is coming. ESOCKETTIMEDOUT is not coming from got nor openid-client.
Not sure what your networking setup is, do you have an http/s proxy in your environment, does your user you test manually with have an http_proxy env set and the node user running your client not?
Try to do a plain request to that url using node's https module directly as a first thing in your node process to see whether you get a response from it.
from node-openid-client.
Not sure what your networking setup is, do you have an http/s proxy in your environment, does your user you test manually with have an http_proxy env set and the node user running your client not?
We don't have any http/s proxy set in our environment and I am testing with admin privileges
Try to do a plain request to that url using node's https module directly as a first thing in your node process to see whether you get a response from it.
we tried this and it giving the response without fail. We also tried using postman from the same client machine and it also working
Apart from those we tried to set threadpool size and it also failed.
#!/usr/bin/env node process.env.UV_THREADPOOL_SIZE = 128;
If you have time, I can provide you working repo where you can try and reproduce the same issue.
from node-openid-client.
wouldn't hurt to dig in
from node-openid-client.
I found if there are too many async requests, then ESOCKETTIMEDOUT exception happens in linux. The workaround I've found is doing this:
setting this options to request():
agent: false, pool: {maxSockets: 100}
Notice that after that, the timeout can be lying so you might need to increase it. Also in linux you could increase the max number of opened files per process to solve it.
from node-openid-client.
Related Issues (20)
- OAuth 2.0 Device Authorization Grant (Device Flow) - poll without PKCE HOT 3
- Type checking httpOptions and rejectUnauthorized
- RPError thrown when IdToken JWE Header enc is blank HOT 2
- client won't run under `edge` runtime HOT 1
- Support setting client_secret to an empty string when using client_secret_basic or client_secret_post HOT 1
- Cannot assign to read only property 'dpopProof' of object '#<Client>' HOT 2
- Unsuccessful Callback to Unknow client side error HOT 10
- isKeyObject check fails in Bun HOT 5
- Scope delimiter replace problem HOT 2
- Multiple authenticate requests from the same session causes state mismatch HOT 1
- Can't authenticate when the server advertises authorization_response_iss_parameter_supported HOT 2
- Requests made without Accept-Encoding header HOT 1
- "cty" should not be included in jwks query HOT 2
- URL is not a constructor at Issuer.request HOT 1
- Application and Identity manger on different domains HOT 1
- Support other status code than 200 HOT 4
- Unable to use private_key_jwt auth method with Azure.
- Audience matching doesn't work as intended HOT 1
- Using `authorizationUrl()` in combination with PAR adds too many parameters HOT 3
- update interface AuthenticateOptions to include redirect_uri HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-openid-client.