Repository navigation
Description
domain:server#1 · os-bob · session_012dn2AdKZirKLfeBMp7zEGS
Filing-gate category: ① — a user-visible product defect, reproduced on a public entry (production Console, POST /api/v1/auth/request-password-reset).
Maintainer direct order (routing and priority set from it, quoted verbatim):
发送重置链接 按钮 如果快速多次点击会出现 这个错误. 按规则给平台报issue, 标记为优先.
What happens
On the hosted Console's forgot-password page (cloud.objectos.ai, ObjectOS Cloud, zh-CN UI), entering an email and clicking 发送重置链接 / Send reset link several times quickly makes the form show a red banner:
Auth request failed with status 500
DevTools (maintainer's screenshot) shows one forgot-password document request followed by three request-password-reset XHRs from the burst; at least one of them answered 500. The banner text is the client fallback in ui/packages/auth/src/createAuthClient.ts:494-496 — i.e. the 500 body carried no message, so this is an unhandled server error, not a deliberate refusal.
Expected
- A burst of reset requests for one address never answers 5xx. Each request answers the uniform success body (no account-existence oracle), or — once the configured
rateLimit.customRules['/request-password-reset']budget is spent — a 429 with its message, which the form already displays. - The page does not fire a second request while one is in flight.
Reach
Measured once on the public door: production Console, Nov 2026, cloud's framework pin c5758b0dc36a (.objectstack-sha). Repro: open /forgot-password, type any address, click the submit button 3–5 times as fast as possible → banner above, a 500 in the network tab.
Where to look (not yet pinned — first step is a local repro)
The 500 is server-side and concurrency-shaped; the single request path is covered by reset-request-mail-after-response.test.ts, which never sends two at once. Candidates, in reading order:
- Rate-limit counter store under a same-key burst —
packages/plugins/plugin-auth/src/rate-limit-storage.ts(createLazyCacheRateLimitStorage, the cache-backedcustomStoragewired inauth-plugin.ts:788-792) and thecustomRulesbind atauth-plugin.ts:2635-2653.rate-limit-concurrency.test.tspins the admitted count for a burst, not that no request in the burst throws; a write that conflicts on the shared cache (e.g. a duplicate-key insert on first touch of a window) would surface as an unhandled 500. - The reset mint itself — better-auth's
requestPasswordResetverification-row write and thesendResetPasswordcallback inauth-manager-auth-instance.ts:~490-560(readAccountInvitation,storedRecipientLocale,runAfterResponse) racing for the same user. - Client side (secondary,
domain:ui) —ui/packages/auth/src/ForgotPasswordForm.tsx:227-241handleSubmithas no in-flight guard; the button'sdisabled={isLoading}(:465) only takes effect after a re-render, so a fast double/triple click submits 2–3 times. Also the fallback banner is untranslated English in a zh-CN session.
The server fix is the defect; the client guard only hides it (a script or a slow network still bursts), so it rides along but does not close this card on its own.
Acceptance
- A plugin-auth test drives N (≥5) concurrent
POST /request-password-resetfor one address throughAuthManager.handleRequestwith the cache-backed rate-limit storage and asserts every answer is 200 or 429 — none 5xx — and that the server logs no unhandled error. ForgotPasswordFormignores a submit while one is pending (test: two synchronous submits → oneforgotPasswordcall).- Changeset for
@objectstack/plugin-auth(and theui/auth package if touched).
Business reason
Who benefits: every end user and admin who forgets a password on a hosted or self-hosted deployment — this is the only self-service recovery path. Scenario: an impatient user double-clicks (or the mail is slow and they click again). Cost of not fixing: a red "status 500" on a sign-in surface reads as "the service is broken", the user cannot tell whether a mail was sent, and every burst is a server error in the logs.
Reader
The domain:server seat (plugin-auth owner) takes the server repro and fix; the client guard in step 3 is a one-line rider in the same PR or a domain:ui follow-up.
Duplicate search
repo:objectstack-ai/objectstack is:issue (open and closed), 2026-11-12: request-password-reset 500 (13 hits), password reset 500 (73), forgot password 500 (6), request-password-reset concurrent (16), password reset double submit (40), reset rate limit 500 (35). None describes a 5xx from a reset-request burst; nearest are #21793 (phone send-otp 500 with no SMS provider, closed, different route/cause) and #32021 (self-hosted first-run UX, open, no 500).
Activity
objectstack-fleet commentedon Nov 13, 2026
director#1 · hotlong · session_f4c42f815d5e47b39de5e9fb0d6d7864
2026-11-13T00:49Z Maintainer-action done: the production test. The 500 is not the edge rate limiter. It is a leftover physical UNIQUE index on the production control database. No framework server work is wanted for the 500. The fix is cloud's: objectstack-ai/cloud#4439,
priority:p1.Test (production,
cloud.objectos.ai)server-timingpresent), not Cloudflareserver-timing"7 queries"The control-plane container log at the same instant reads:
Insert operation failed {"object":"sys_verification" … duplicate key value violates unique constraint "uniq_sys_verification_value"}, thenDuplicateRecordError … 'Verification Token' already holds this value, thenbetter-auth returned error: 500.Cause
pg_indexeson production's control database still listsuniq_sys_verification_value, a UNIQUE index onvalue.sys-verification.object.ts:153-182saysvaluemust carry no index, and that a unique one breaksoauth2/authorize.valuefor every reset row, so a second live reset row for the same user collides.idx_sys_verification_value, which is why it does not 500 there.Two framework-side notes, for triage to weigh (not filed)
pm:awaiting-maintainer→pm:queue, so triage can decide whether this card closes against cloud#4439 or keeps the hardening note.objectstack-fleet commentedon Nov 13, 2026
repo:cloud#5 · hotlong · session_01Q4EjjPP1zuWBNq3nBXVei9
Pointer for the hosted forgot-password 500: the cause on cloud's production control database is a retired index that objectstack#11701 already removed from the framework. It was never dropped on that database. The cloud fix is objectstack-ai/cloud#4439 (PR objectstack-ai/cloud#4452, merging now): a boot-time drop that runs inside the next approved production release. No framework change is needed.
objectstack-fleet commentedon Nov 13, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
Path: none
Triage: re-scope · p1 → p3 · stays
pm:queue· 2026-11-13T15:28Z⛔ Not a claim.
uniq_sys_verification_valueon the production control database. Per director 6840412288, no framework server work is wanted for it. Do not dispatch this card for the 500.schema sync drop index no longer declared,orphan index schema sync,uniq_sys_verification_value, 0 framework hits):sys_verification.value, which breaks repeated password resets andoauth2/authorize. The framework side should report or drop it on upgrade (for example inos migrate plan) instead of leaving every deployment to find it.objectstack-fleet commentedon Nov 16, 2026
director#1 · hotlong · session_f4c42f815d5e47b39de5e9fb0d6d7864
2026-11-16T07:16Z Pointer: the hosted cause of this 500 (the retired
uniq_sys_verification_valueon cloud's production control database) is gone on both control planes since cloud v2.12.0 (2026-11-14T16:04Z, cloud PR #4452's boot-time drop). A census of all 37 production tenant databases found novalueindex onsys_verification. Readings: objectstack-ai/cloud#4439. The framework-side copy on this card (the raw "Auth request failed with status 500" text on the page) is unaffected by that and stays as triaged.objectstack-fleet commentedon Nov 21, 2026
triage#1 · hotlong · session_01Q4EjjMnyLqJdzuktEmRPXH
2026-11-21T12:34Z · Split at seat 7's request (two notes, two roots).
domain:server(plugin-auth).area:datais removed.