auth: manual/no-browser paste mode for Fjord-Account OIDC login (--manual) + branded loopback callback page #224

Closed
opened 2026-07-21 16:15:41 +00:00 by stephen · 0 comments
Owner

Summary

Add a manual / no-browser paste mode to the Fjord-Account OIDC login (fj auth login --fjord --manual, alias --no-browser) so a user whose browser is on a different device than fj (e.g. iPad Safari while fj runs on a Mac/server) can complete sign-in. Loopback capture is same-device only; this is the interim until device-flow lands (separate brief).

Behavior

Keep the whole authcode+PKCE flow except the loopback capture: print the authorize URL, user signs in on any device, copies the full redirected …/callback?code=…&state=… URL (or bare code) from the address bar even though the page fails to load, and pastes it back. Validate returned state matches (CSRF guard), then exchange code+code_verifier+redirect_uri at the token endpoint and store the bearer exactly as the loopback path does. redirect_uri stays a registered http://127.0.0.1:47017/callback.

Zero OP/paragon changes: the fj-cli OIDC client is already registered on prod paragon.

Also (same PR)

Brand the loopback callback success/failure page (src/fjord/oidc.rs::write_response) to the Fjord premium bar: self-contained inline CSS, embedded logo data: URI, light/dark aware, success + failure + state-mismatch variants. Polish the terminal-side manual-flow copy.

Interim; device-flow is the durable replacement.

## Summary Add a manual / no-browser paste mode to the Fjord-Account OIDC login (`fj auth login --fjord --manual`, alias `--no-browser`) so a user whose browser is on a **different device** than fj (e.g. iPad Safari while fj runs on a Mac/server) can complete sign-in. Loopback capture is same-device only; this is the interim until device-flow lands (separate brief). ## Behavior Keep the whole authcode+PKCE flow except the loopback capture: print the authorize URL, user signs in on any device, copies the full redirected `…/callback?code=…&state=…` URL (or bare code) from the address bar even though the page fails to load, and pastes it back. Validate returned `state` matches (CSRF guard), then exchange `code`+`code_verifier`+`redirect_uri` at the token endpoint and store the bearer exactly as the loopback path does. `redirect_uri` stays a registered `http://127.0.0.1:47017/callback`. Zero OP/paragon changes: the `fj-cli` OIDC client is already registered on prod paragon. ## Also (same PR) Brand the loopback callback success/failure page (`src/fjord/oidc.rs::write_response`) to the Fjord premium bar: self-contained inline CSS, embedded logo `data:` URI, light/dark aware, success + failure + state-mismatch variants. Polish the terminal-side manual-flow copy. Interim; device-flow is the durable replacement.
Sign in to join this conversation.
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
rasterstate/fj#224
No description provided.