Skip to content

feat(webapp): rework login page and SSO sign-in UI#4182

Open
samejr wants to merge 10 commits into
mainfrom
samejr/sso-ui
Open

feat(webapp): rework login page and SSO sign-in UI#4182
samejr wants to merge 10 commits into
mainfrom
samejr/sso-ui

Conversation

@samejr

@samejr samejr commented Jul 7, 2026

Copy link
Copy Markdown
Member

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/magic becomes a confirmation-only screen that names the address the link was sent to, and /login/sso gets refreshed, enterprise-oriented copy.

CleanShot 2026-07-07 at 16 53 21

samejr added 5 commits July 2, 2026 15:47
- /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.
@changeset-bot

changeset-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 2605efc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai

coderabbitai Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

This PR reworks the login and SSO flows. The /login page now includes an inline magic-link email form with Conform/Zod validation and loading state, and presents SSO as a LinkButton. The /login/magic route is changed to confirmation-only behavior with loader/action updates, cookie handling for the submitted email, and redirects back to /login on invalid or reset cases. The /login/sso page refreshes copy, adds Conform-based email validation, and includes an extra contact link. The shared login layout removes its documentation link, and a changelog entry records the UI change.

Changes

Area Changes
Login layout Removed documentation link button; adjusted imports
/login route Inline magic-link form with validation and loading state; SSO as LinkButton; conditional divider
/login/magic route Confirmation-only rendering; cookie-based email handoff; updated redirects
/login/sso route Refreshed copy, Conform/Zod email validation, simplified loading icon, added SSO contact link
Changelog New entry describing the UI 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
Loading

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)

Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description only includes a summary and image, but it misses the required Closes, checklist, testing, changelog, and screenshots sections. Add the template sections with issue reference, checklist completion, testing steps, changelog summary, and screenshots/links if available.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the main change: a rework of the login page and SSO sign-in UI.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch samejr/sso-ui

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.

devin-ai-integration[bot]

This comment was marked as resolved.

@pkg-pr-new

pkg-pr-new Bot commented Jul 7, 2026

Copy link
Copy Markdown

Open in StackBlitz

@trigger.dev/build

npm i https://pkg.pr.new/@trigger.dev/build@4b5626a

trigger.dev

npm i https://pkg.pr.new/trigger.dev@4b5626a

@trigger.dev/core

npm i https://pkg.pr.new/@trigger.dev/core@4b5626a

@trigger.dev/python

npm i https://pkg.pr.new/@trigger.dev/python@4b5626a

@trigger.dev/react-hooks

npm i https://pkg.pr.new/@trigger.dev/react-hooks@4b5626a

@trigger.dev/redis-worker

npm i https://pkg.pr.new/@trigger.dev/redis-worker@4b5626a

@trigger.dev/rsc

npm i https://pkg.pr.new/@trigger.dev/rsc@4b5626a

@trigger.dev/schema-to-json

npm i https://pkg.pr.new/@trigger.dev/schema-to-json@4b5626a

@trigger.dev/sdk

npm i https://pkg.pr.new/@trigger.dev/sdk@4b5626a

commit: 4b5626a

devin-ai-integration[bot]

This comment was marked as resolved.

coderabbitai[bot]

This comment was marked as resolved.

samejr added 3 commits July 7, 2026 16:10
- 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.
devin-ai-integration[bot]

This comment was marked as resolved.

@samejr samejr added the preview label Jul 7, 2026
@trigger-dot-bot

trigger-dot-bot Bot commented Jul 7, 2026

Copy link
Copy Markdown

Preview Deployment

Status Preview Commit Updated
🟢 Ready samejr-sso-ui.triggerlabs.dev 2605efc Jul 7, 16:09 UTC

@nicktrn nicktrn left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, 1 small change

Comment thread .server-changes/login-sso-ui.md Outdated
Co-authored-by: nicktrn <55853254+nicktrn@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants