mirror of
https://github.com/hoppscotch/hoppscotch.git
synced 2026-04-26 09:16:03 +03:00
[GH-ISSUE #5885] [bug]: authExchange creates infinite retry loop on permanent auth/refresh failure, flooding backend with requests #2314
Labels
No labels
CodeDay
a11y
browser limited
bug
bug fix
cli
core
critical
design
desktop
discussion
docker
documentation
duplicate
enterprise
feature
feature
fosshack
future
good first issue
hacktoberfest
help wanted
i18n
invalid
major
minor
need information
need testing
not applicable to hoppscotch
not reproducible
pull-request
question
refactor
resolved
sandbox
self-host
spam
stale
testmu
wip
wont fix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/hoppscotch#2314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Leon-Luu on GitHub (Feb 17, 2026).
Original GitHub issue: https://github.com/hoppscotch/hoppscotch/issues/5885
Originally assigned to: @anwarulislam, @mirarifhasan on GitHub.
Is there an existing issue for this?
Platform
Web App
Browser
Chrome
Operating System
macOS
Bug Description
Description
When a user's refresh token is permanently invalid (expired, rotated, or cookie deleted), the authExchange in the GQL client enters an infinite retry loop that floods the backend with thousands of GET /v1/auth/refresh requests per minute.
Observed behavior:
We had seen many times more than 16,000+ requests to from a single IP within ~10 minutes
All returning 404/403 (refresh token invalid)
Requests originated from a single browser session (Chrome 144, macOS)
The loop continued indefinitely until the user manually closed the tab
Root cause:
In GQLClient.ts, the authExchange configuration has no retry limit:
When didAuthError() returns true, urql calls refreshAuth(). If the refresh fails (returns false), urql retries the original GQL operation, which fails auth again, triggering another refreshAuth() — creating an infinite loop.
Additionally, refreshToken() in index.ts silently swallows all errors and has no mechanism to stop retrying:
Impact:
Proposed fix:
Deployment Type
Self-hosted (on-prem deployment)
Version
2026.1.1
@Leon-Luu commented on GitHub (Mar 13, 2026):
@mirarifhasan @anwarulislam @jamesgeorge007 would be good if Hoppscotch team takes ownership to fix this issue instead of random users providing fix with ai without commitments of following up. This is core issue and important to fix I think.
@cB-Abhinav-Gautam commented on GitHub (Mar 16, 2026):
Any temporary fix?
@matthewwalker1621-star commented on GitHub (Mar 16, 2026):
Any temporary fix untill then please
On Mon, Mar 16, 2026, 1:53 AM Abhinav Gautam @.***>
wrote:
@roopepaajanen commented on GitHub (Mar 16, 2026):
Redeploying the application during off hours clears out all idle connections and keeps failing traffic to a minimum, but this is only a temporary solution.