feat(webapp): rework login page and SSO sign-in UI#4182
Conversation
- /login: SSO is now a button placed after Google (was a text link); email sign-in is an inline magic-link form under an "or" divider that posts to the /login/magic action, reusing its rate-limit + SSO auto-discovery logic. The "Last used" badge now centers on the email button. - /login/magic is confirmation-only: visits without a pending magic link redirect to /login, keeping the inline form the single source of truth and avoiding a 404 for existing links (including the expired-link callback). - /login/sso: "Welcome" heading, "Sign in with your enterprise account" subtitle, "Enterprise email address" placeholder, no padlock on the button, and an "Ask about SSO" link opposite "All login options". - Remove the Documentation link from the shared login layout.
Use conform (@conform-to/react + @conform-to/zod) for client-side email validation on the /login inline email form and the /login/sso enterprise email field. Invalid emails now surface the app's standard inline FormError (associated with the field for accessibility) instead of the browser's native tooltip. Both forms still post cross-route to their existing actions (/login/magic, /auth/sso), so server-side errors keep their current paths.
Name the address the link was sent to (rendered bright) in the confirmation copy, carried through on the success redirect. Tighten the wording and balance the line wrapping so it doesn't orphan a word. "Re-enter email" now returns to /login (where the email form lives) instead of bouncing through this route's loader redirect.
…ider - /login/magic is confirmation-only now (the email form lives on /login), so drop the dead form branch and its unused imports and render any flashed auth:error inline on the confirmation. - /login: only render the "or" divider when a social/SSO option is shown above it, so it never appears with nothing before it.
|
WalkthroughThis PR reworks the login and SSO flows. The Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant LoginIndexRoute
participant LoginMagicRoute
User->>LoginIndexRoute: submit email form (action=send)
LoginIndexRoute->>LoginMagicRoute: POST /login/magic
LoginMagicRoute-->>User: redirect to /login/magic with confirmation state
Related PRs: None found. Suggested labels: area: frontend, area: auth Suggested reviewers: matt-aitken, ericallam A rabbit hopped to the login gate, Inlined a form, made SSO straight, Magic links now sent then shown, A confirmation page, calm and known, Hop, click, sign in—done in one state.🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
@trigger.dev/build
trigger.dev
@trigger.dev/core
@trigger.dev/python
@trigger.dev/react-hooks
@trigger.dev/redis-worker
@trigger.dev/rsc
@trigger.dev/schema-to-json
@trigger.dev/sdk
commit: |
- Pass the confirmation email to /login/magic in a short-lived httpOnly cookie rather than a ?email= query param, so the address never lands in access logs, browser history, or error-tracker breadcrumbs. - Send the action's validation-failure, rate-limit, and auth-failure paths straight to /login instead of /login/magic (which the loader guard would bounce again), matching the reset path.
|
Preview Deployment
|
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
Summary
Reworks the login and SSO sign-in screens. On the main login page, SSO is now a button alongside GitHub and Google, email sign-in is an inline magic-link form under an "or" divider, and both email fields validate inline with the app's standard styled error instead of the browser's native tooltip.
/login/magicbecomes a confirmation-only screen that names the address the link was sent to, and/login/ssogets refreshed, enterprise-oriented copy.