fix: redirect to /auth/initial-setup after hitting auth rate limit (#…#3410
Open
Adityakk9031 wants to merge 1 commit into
Open
fix: redirect to /auth/initial-setup after hitting auth rate limit (#…#3410Adityakk9031 wants to merge 1 commit into
Adityakk9031 wants to merge 1 commit into
Conversation
Adityakk9031
requested review from
miloschwartz and
oschwartz10612
as code owners
July 8, 2026 18:04
Contributor
|
Fixes something couldn't replicate though? Sorry if I come off terse or whatnot, Not trying to be, Just wasn't able to replicate the issue they mentioned with their steps on EE, So the question is what did you do differently to replicate or just went to the code and tried to find the reference for that? or weren't able to replicate either but went to find a fix? |
Contributor
Author
|
Hi @AstralDestiny, |
Contributor
Author
|
@miloschwartz have a look please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #3408
After hitting the
rate_limits.authlimit, reloading the dashboard rootredirected users to
/auth/initial-setupinstead of staying on the loginpage — even on a fully configured instance.
Root Cause
Two issues combined to cause the redirect:
1.
GET /auth/initial-setup-completewas inside the globalauthRouterrate limiter scope.
The
authRouterapplies a blanket rate limiter to every/auth/*route usingan
<IP>:<path>key. The/initial-setup-completeendpoint is called onevery dashboard root page load (it's a pure boolean read with no secrets),
so with a low
max_requestsvalue it exhausted its own per-path budget afterjust a few reloads and started returning
429.2. The
page.tsxroot page silently swallowed the 429.