When the dashboard token refresh endpoint returned 429 (shared critical rate limit) the frontend classified it as out_of_sync, cleared local auth state, and redirected to /sign-in. The rate limit itself is working as intended; the bug is that a temporary rejection was treated as a terminal auth failure. - Treat 429 refresh responses as transient errors on the frontend, keeping the session retryable instead of clearing it. Only explicit 401 or confirmed session mismatch/race exhaustion clears auth state. - Return Retry-After on all rate-limited responses (remaining TTL on Redis, window duration on the in-memory limiter) so clients can back off. - Log the underlying error with request context when auth session errors map to 500 AUTH_INTERNAL_ERROR, and replace fmt.Println with request-scoped logging in the Redis rate limiter error paths. Fixes #6361
| Name |
Last commit
|
Last Update |
|---|---|---|
| .. | ||
| audit.go | Loading commit data... | |
| auth.go | Loading commit data... | |
| auth_origin.go | Loading commit data... | |
| auth_origin_test.go | Loading commit data... | |
| auth_test.go | Loading commit data... | |
| body_cleanup.go | Loading commit data... | |
| cache.go | Loading commit data... | |
| cors.go | Loading commit data... | |
| disable-cache.go | Loading commit data... | |
| distributor.go | Loading commit data... | |
| email-verification-rate-limit.go | Loading commit data... | |
| gzip.go | Loading commit data... | |
| header_nav.go | Loading commit data... | |
| header_nav_test.go | Loading commit data... | |
| i18n.go | Loading commit data... | |
| jimeng_adapter.go | Loading commit data... | |
| kling_adapter.go | Loading commit data... | |
| logger.go | Loading commit data... | |
| model-rate-limit.go | Loading commit data... | |
| model_rate_limit_test.go | Loading commit data... | |
| performance.go | Loading commit data... | |
| rate-limit.go | Loading commit data... | |
| rate_limit_test.go | Loading commit data... | |
| recover.go | Loading commit data... | |
| request-id.go | Loading commit data... | |
| request_body_limit.go | Loading commit data... | |
| secure_verification.go | Loading commit data... | |
| stats.go | Loading commit data... | |
| turnstile-check.go | Loading commit data... | |
| utils.go | Loading commit data... |