Describe the bug
While reviewing the OAuth authentication flow, I noticed that outbound fetch requests inside apps/dashboard-api/src/controllers/auth.controller.js currently do not use timeout handling through AbortController or similar mechanisms.
Because of this, if an upstream OAuth provider becomes slow or temporarily unresponsive, requests may remain pending for a long time and unnecessarily keep server resources occupied.
Where I found this
File:
apps/dashboard-api/src/controllers/auth.controller.js
Observed in outbound OAuth/profile-related fetch requests.
To Reproduce
-
Open apps/dashboard-api/src/controllers/auth.controller.js
-
Locate outbound fetch requests used in the OAuth flow
-
Observe that the requests currently do not configure:
AbortController
- timeout handling
- abort signals
Expected behavior
Outbound HTTP requests should include timeout protection so requests can fail gracefully instead of potentially hanging indefinitely when external services fail to respond.
Impact
Without timeout handling:
- requests may hang indefinitely
- external provider/network stalls can tie up backend resources
- auth-related flows may become unreliable during upstream failures
Proposed solution
I plan to add lightweight timeout protection around outbound fetch calls using AbortController.
Proposed changes:
- add timeout handling for external fetch requests
- abort long-running requests gracefully after a fixed duration
- properly clear timers after request completion
- keep existing auth flow behavior unchanged
ETA
I’ll work on this and try to raise a PR by tonight.
Describe the bug
While reviewing the OAuth authentication flow, I noticed that outbound
fetchrequests insideapps/dashboard-api/src/controllers/auth.controller.jscurrently do not use timeout handling throughAbortControlleror similar mechanisms.Because of this, if an upstream OAuth provider becomes slow or temporarily unresponsive, requests may remain pending for a long time and unnecessarily keep server resources occupied.
Where I found this
File:
Observed in outbound OAuth/profile-related fetch requests.
To Reproduce
Open
apps/dashboard-api/src/controllers/auth.controller.jsLocate outbound
fetchrequests used in the OAuth flowObserve that the requests currently do not configure:
AbortControllerExpected behavior
Outbound HTTP requests should include timeout protection so requests can fail gracefully instead of potentially hanging indefinitely when external services fail to respond.
Impact
Without timeout handling:
Proposed solution
I plan to add lightweight timeout protection around outbound fetch calls using
AbortController.Proposed changes:
ETA
I’ll work on this and try to raise a PR by tonight.