Skip to content

feat(auth): a message on the login page - #68

Merged
dskripchenko merged 1 commit into
mainfrom
feat/login-notice
Oct 14, 2026
Merged

dskripchenko merged 1 commit into
mainfrom
feat/login-notice

Conversation

@dskripchenko

Copy link
Copy Markdown
Owner

Second piece of groundwork for SSO (printable ADR-038), still protocol-free: when an external sign-in turns someone away (no mapped role, an email conflict, the provider down), the package redirects back to the login page with a reason.

  • Auth\LoginNotice::put($message, $tone) — kept in the session; take() pulls it once.
  • Bootstrap: loginNotice for a guest, taken by whichever request builds the bootstrap — the redirected page (inline) or the bootstrap call (xhr). A flash would not survive xhr: the page request ages it.
  • LoginForm: a kit UidAlert above the form with the notice's tone; hidden once the form shows its own error.
  • Docs (en/ru/de/zh integration.md), CHANGELOG under Unreleased, public/ rebuilt.

Tests: bootstrap carries the notice once, unknown tone falls back to danger, LoginForm renders it. Full pest (1247) and vitest (973) green locally.

🤖 Generated with Claude Code

Auth\LoginNotice::put($message, $tone) leaves a reason for the login
page — why an external sign-in turned someone away — and the next
bootstrap takes it (`loginNotice`); LoginForm shows it once above the
form. Kept in the session rather than flashed, so it survives the xhr
bootstrap strategy too.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@dskripchenko
dskripchenko merged commit 7e1e601 into main Oct 14, 2026
12 checks passed
@dskripchenko dskripchenko mentioned this pull request Oct 14, 2026
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