Skip to content

feat(platform): advise of lockout risk on a failed login - #1811

Merged
yannickmonney merged 1 commit into
mainfrom
fix/login-lockout-advisory
Jun 2, 2026
Merged

yannickmonney merged 1 commit into
mainfrom
fix/login-lockout-advisory

Conversation

@yannickmonney

Copy link
Copy Markdown
Contributor

What

Addresses #1566. A failed sign-in gave the user no hint that repeated failures lock the account, so the lockout felt like it came out of nowhere — only the admin was notified.

Now a failed credential attempt shows a calm, muted advisory beneath the error:

Repeated failed attempts will temporarily lock the account.

It is not shown once the account is already locked (the lockout countdown message stands on its own).

Why not an "N attempts remaining" counter

The issue requested a progressive counter. In an audited deployment that is a security regression, so it is deliberately not implemented:

  • A per-attempt counter only appears for real accounts, breaking the uniform "wrong email or password" response and reintroducing account enumeration (the very thing the existing jitter + uniform-404 mitigations remove).
  • It also hands an attacker an exact brute-force budget per account.

The standing advisory conveys the consequence (so the user isn't surprised) without leaking either signal. An emailed owner alert was considered but the platform has no transactional-email infrastructure (requireEmailVerification: false, password reset is admin-managed), so it's out of scope here.

Changes

  • log-in.tsx: a showLockoutHint state, set on a failed credential attempt and cleared on lockout / new submit; muted advisory line under the error.
  • en/de/fr: auth.login.lockoutAdvisory.

Verification

typecheck · lint · i18n parity/usage green.

Refs #1566.

@coderabbitai

coderabbitai Bot commented Jun 1, 2026 •

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@yannickmonney, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 17 minutes and 54 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: c0fb1dfa-ec98-40b4-92e0-e11c31116eb0

📥 Commits

Reviewing files that changed from the base of the PR and between d8068d8 and 3728dee.

📒 Files selected for processing (4)
  • services/platform/app/routes/_auth/log-in.tsx
  • services/platform/messages/de.json
  • services/platform/messages/en.json
  • services/platform/messages/fr.json
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/login-lockout-advisory

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Addresses #1566: a failed sign-in gave no hint that repeated failures lock
the account, so the lockout felt like it came out of nowhere.

Shows a calm, muted advisory beneath the error on a failed credential
attempt — "Repeated failed attempts will temporarily lock the account." —
and not once the account is already locked (the lockout message stands on
its own).

Deliberately count-free: the issue asked for an "N attempts remaining"
counter, but in an audited deployment a live counter breaks the uniform
"wrong email or password" response (confirming an account exists) and hands
an attacker a brute-force budget. The advisory conveys the consequence
without leaking either. en/de/fr strings added.

Refs #1566
@yannickmonney
yannickmonney force-pushed the fix/login-lockout-advisory branch from 7c6770d to 3728dee Compare June 1, 2026 23:43
@yannickmonney

Copy link
Copy Markdown
Contributor Author

Pre-emptively ran the CodeRabbit CLI and applied both findings: the post-await fallback now tracks an authErrorHandled flag instead of reading the stale loginError closure value (so a 429 lockout message can't be overwritten), and the advisory <p> got aria-live="polite" so screen readers announce it. text-muted-foreground matches the app's existing secondary/helper text token.

@yannickmonney
yannickmonney merged commit 50e1a9f into main Jun 2, 2026
28 checks passed
@yannickmonney
yannickmonney deleted the fix/login-lockout-advisory branch June 2, 2026 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant