fix: change-password in-form validation, reauth warning, global sign-out (#1945)#1969
fix: change-password in-form validation, reauth warning, global sign-out (#1945)#1969larryro wants to merge 1 commit into
Conversation
|
Warning Review limit reached
More reviews will be available in 44 minutes and 2 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (10)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Billing warning: we have not been able to collect payment for this subscription for more than 72 hours. Please update the payment method or pay any pending invoices in Billing to avoid service interruption. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Desk Review — #1945 change-password flow (in-form validation, reauth warning, global sign-out)Verdict: READY TO MERGE. All three acceptance criteria are met, the change is minimal and follows repo conventions, the new behavior is test-backed, the full server suite passes locally, and CI is green. CI47 checks pass, 4 skipping (fork-PR duplicate jobs — Tests run locally (this branch)
Acceptance criteria
Non-blocking observations (optional follow-ups, not required for merge)
Nice work — the fix mirrors the structured-error pattern the issue asked for and the global sign-out is genuinely enforced server-side. |
Resolves #1945.
What changed
1. In-form validation of the current password
A wrong current password is now surfaced as an inline field error on the current-password input (matching the 2FA / add-member flows) instead of a generic destructive toast.
convex/users/update_user_password.ts): thechangePasswordcall is wrapped so a Better AuthINVALID_PASSWORDAPIErroris re-raised as a structuredConvexError({ code: 'INVALID_CURRENT_PASSWORD' }).account-form.tsx):onSubmitinspects the error withconvexErrorCode()and callssetError('currentPassword', …)for that code; only unexpected failures fall through to the toast.2. Reauth / global sign-out warning
The Change-password dialog now shows a
warningAlertbefore submit: changing the password signs you out of all devices and requires signing in again.3. Global sign-out (verified + test-backed)
The voluntary credential flow already passes
revokeOtherSessions: trueto Better Auth (revokes every other session); the client then signs the current session out, so the net effect is a global sign-out. Added/strengthened backend tests asserting:changePasswordis called withrevokeOtherSessions: true,revokeOtherSessions,INVALID_CURRENT_PASSWORD.Ripple
en/de/fr(+de-CHoverride):auth.changePassword.validation.currentIncorrectandauth.changePassword.warning.{title,description}.docs/{en,de,fr}/platform/member/preferences.md.Verification
bunx vitest run convex/users/update_user_password.test.ts→ 6 passedlib/i18n/messages.test.ts(locale parity) → 23 passedbun run --filter @tale/platform typecheck→ exit 0bunx oxlint→ 0 errors (type-awaretsgolintphase OOMs in the sandbox; runs in CI)