A developer sign-in told as a terminal session: prompt lines type in, a one-time device code appears with a copy button, a pulsing waiting line counts down to expiry, plus a token form for headless machines.
Authorize the Forge CLI with a one-time device code. No passwords in your shell history, and you can revoke the session any time.
forge auth login in any project.npx shadcn@latest add https://hyperblur.dev/r/login-terminal.jsonWorks in any React project set up with the shadcn CLI. The file lands in components/hyperblur/login-terminal.tsx.
import { LoginTerminal } from "@/components/hyperblur/login-terminal"
<LoginTerminal code="KQRT-8LMP" status={status} onSubmit={({ token }) => checkToken(token)} />| Prop | Type | Default | Description |
|---|---|---|---|
| title | string | "Sign in from your terminal" | Heading. |
| subtitle | string | "Authorize the Forge CLI with a one-time device code..." | Text under the heading. |
| command | string | "forge auth login" | Command shown in the steps and terminal. |
| code | string | "WDJB-MJHT" | One-time device code. |
| verifyUrl | string | "https://forge.dev/device" | Page where the code is entered. |
| user | string | "mara-k" | Username printed after approval. |
| expiresIn | number | 900 | Seconds until the code expires. |
| status | "waiting" | "approved" | "expired" | Controlled status, for example from polling your device endpoint. | |
| defaultStatus | "waiting" | "approved" | "expired" | "waiting" | Initial status when uncontrolled. |
| onStatusChange | (status: "waiting" | "approved" | "expired") => void | Called when the code expires or a token is accepted. | |
| onCodeCopy | (code: string) => void | Called after the code is copied to the clipboard. | |
| onSubmit | (values: { token: string }) => boolean | void | Promise<boolean | void> | Called with a pasted token that passes the format check. Return false to reject it. | |
| tokenPrefix | string | "fg_" | Required token prefix. Tokens must be at least 20 characters longer than it. |
| accent | string | "#4ade80" | Accent color for buttons, focus rings and highlights. |