feat(oauth): style the login callback page#337
Merged
Conversation
Replace the bare system-ui callback page with a self-contained, dark-themed page that matches the dashboard auth screens: pure-black background, the Resend logomark, the dashboard text hierarchy, and the silk background image. The local callback server has no asset pipeline and runs offline on 127.0.0.1, so everything is inlined: CSS, the logomark SVG, and the background. The background mirrors apps/dashboard/public/static/background-auth.jpg, downscaled to 1600px and re-encoded (JPEG q60) so it can be embedded as a data URI (854KB -> ~50KB; it's smooth grayscale silk, so it's lossless at display size). Also HTML-escapes the heading/message, since the failure variant reflects the OAuth `error` query param into the page.
gabrielmfern
approved these changes
Jun 26, 2026
Member
|
beatifulll |
Contributor
There was a problem hiding this comment.
1 issue found across 1 file (changes from recent commits).
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="src/lib/oauth.ts">
<violation number="1" location="src/lib/oauth.ts:176">
P1: Removed HTML escaping introduces reflected XSS in the OAuth callback page. Untrusted `error` query text now renders as raw HTML in browser output.</violation>
</file>
Reply with feedback, questions, or to request a fix.
Fix all with cubic | Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Styles the local OAuth callback page (
resend login) to match the dashboard's auth screens, replacing the bare system-ui page.Before: white page,
font-family: system-ui, centered<h2>+<p>.After: pure-black background, Resend logomark, dashboard text hierarchy, and the silk background image.
How
The callback server (
createCallbackServerinsrc/lib/oauth.ts) has no asset pipeline and runs offline on127.0.0.1, so the page is fully self-contained — all CSS, the logomark SVG, and the background image are inlined.apps/dashboard/public/static/background-auth.jpg. The 1920×1080 / 854KB original is downscaled to 1600px and re-encoded (JPEG q60) → ~50KB raw / 68KB base64, then inlined as a data URI insrc/lib/oauth-background.ts. It's smooth grayscale silk, so the compression is effectively lossless at display size. Dimmed to 20% opacity below 640px, mirroring the dashboard layout.globals.css/tokens.css):#000background,#f0f0f0emphasis text,#a1a4a5body text, 28px / −0.045rem display heading. Forced dark (color-scheme: dark).escapeHtml()now wraps the heading/message — the failure variant reflects the OAutherrorquery param into the page.No change to the OAuth flow, server logic, ports, or timeouts — purely the response body.
Test plan
tsc --noEmit— cleanbiome check .— cleanvitest run— 1002 pass (one pre-existing parallelism flake inwelcome.test.ts, confirmed unrelated; reproduces on the base branch and clears on isolated/repeat runs)createCallbackServerand screenshotted them; confirmed the layout, the silk background, and that a maliciouserrorparam renders as inert textSummary by cubic
Styled the local OAuth callback page to match the dashboard auth screens with a dark theme, Resend logomark, and an inlined silk background. The page is self-contained and served by the local callback server.
New Features
src/lib/oauth-background.ts).Refactors
biome.Written for commit d5c903b. Summary will update on new commits.