Skip to content

Improve auth failure handling - #306

Merged
KaliCZ merged 5 commits into
mainfrom
codex/fix-password-reset
Oct 19, 2026
Merged

KaliCZ merged 5 commits into
mainfrom
codex/fix-password-reset

Conversation

@KaliCZ

@KaliCZ KaliCZ commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Blocked CAPTCHA loading could leave the auth dialog waiting indefinitely, and unexpected errors could leave its controls disabled. The dialog now bounds CAPTCHA loading, restores controls after failures, and shows localized messages for network and service errors.

Supabase Auth HTTP requests abort after 30 seconds, including while reading the response body. Closing and reopening the dialog keeps submissions disabled until the outstanding request settles or aborts. This prevents overlapping sign-ins from replacing the newer session with an older response. Obsolete responses cannot close a reopened dialog or display stale errors. Failed submissions restore keyboard focus when the same dialog remains open and the user has not moved focus to another control.

CAPTCHA preloads when the dialog opens and executes on submission. Failed challenges stop before the auth request. Service outages do not count as incorrect credentials. Progress labels distinguish verification from sending the reset email. Unexpected exceptions retain their original details in Sentry; the shared reporting helper now includes the required SDK function.

Regression tests cover recovery failures, CAPTCHA failures, dialog reopening during successful and failed sign-ins, aborted requests for all 3 submission modes, keyboard focus recovery, and unexpected-error reporting. Setup documentation explains that Supabase Auth and backend notifications use separate SMTP settings.

Validation:

  • Frontend production build, formatting of changed files, and all 54 frontend browser tests passed locally.
  • Timeout regressions verify transport cancellation and that a late response cannot replace the session from a subsequent sign-in.
  • Root npm test cannot start locally because the repository requires .NET 10 and this machine has only .NET 11. CI runs the full backend, frontend, formatting, and end-to-end checks for this revision.
  • The recovery end-to-end test uses real local Supabase and Mailpit, with the external CAPTCHA widget stubbed.

Scope: auth failure handling. Production reset-email delivery recovered independently before deployment of this PR. The earlier service timeouts and debugger-tab switch have no confirmed root cause; this PR does not claim to resolve them.

@KaliCZ KaliCZ changed the title Handle password-reset service and CAPTCHA failures Improve auth failure handling Oct 16, 2026
@KaliCZ
KaliCZ marked this pull request as ready for review October 16, 2026 15:00
@KaliCZ
KaliCZ marked this pull request as draft October 19, 2026 10:37
@KaliCZ
KaliCZ marked this pull request as ready for review October 19, 2026 10:43
@KaliCZ
KaliCZ marked this pull request as draft October 19, 2026 11:01
@KaliCZ
KaliCZ marked this pull request as ready for review October 19, 2026 11:07
@KaliCZ
KaliCZ merged commit 544c31b into main Oct 19, 2026
7 checks passed
@KaliCZ
KaliCZ deleted the codex/fix-password-reset branch October 19, 2026 11:10
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