Skip to content

ApproveDeviceProps

View as Markdown

Defined in: react-ui/src/components/ApproveDevice.tsx:29

Property Type Description Defined in
className? string - react-ui/src/components/ApproveDevice.tsx:60
code string The user code from the link (?code=) or typed by the user, as the terminal shows it. With source: 'link' it must be exactly ABCD-EFGH or ABCDEFGH; anything else shows “This link is not valid” (do not look it up). react-ui/src/components/ApproveDevice.tsx:35
error? object The last failed attempt (e.g. rate_limited, thrown by the hub), shown localized. With a lookup it appears above the buttons, which stay enabled for a retry; with lookup: null (the lookup itself failed) it replaces the “code not found” message. react-ui/src/components/ApproveDevice.tsx:55
error.code | "auth_required" | "not_found" | "runtime_unavailable" | "unsupported_capability" | "invalid_workspace" | "session_busy" | "session_read_only" | "unauthorized" | "forbidden_origin" | "invalid_request" | "approval_expired" | "approval_already_resolved" | "event_replay_unavailable" | "runtime_disconnected" | "policy_denied" | "store_locked" | "attachment_too_large" | "attachment_type_unsupported" | "machine_offline" | "machine_not_found" | "upgrade_required" | "tool_failed" | "device_code_expired" | "rate_limited" | "internal_error" - react-ui/src/components/ApproveDevice.tsx:55
error.details? Record<string, unknown> - react-ui/src/components/ApproveDevice.tsx:55
error.hint? string - react-ui/src/components/ApproveDevice.tsx:55
error.message string - react-ui/src/components/ApproveDevice.tsx:55
locale? Locale UI language (default: the surrounding UncageUIProvider, else 'en'). react-ui/src/components/ApproveDevice.tsx:57
lookup | DeviceLookupInfo | null hub.lookupDevice(code, user); null = unknown, used or expired code. react-ui/src/components/ApproveDevice.tsx:45
source? "link" | "typed" Where code came from. 'link' (default): it arrived in a URL, so it is not trusted on its own (anyone can run uncage setup on their own computer and send the link): the page warns, hides the code’s last 4 characters and enables Approve only once the user typed them from their terminal. 'typed': the user typed the whole code on your page; no extra step. Never derive 'typed' from the URL. react-ui/src/components/ApproveDevice.tsx:43
state? ApproveDeviceState Default 'idle'. react-ui/src/components/ApproveDevice.tsx:49
theme? "auto" | "light" | "dark" Sets data-theme on the root (default 'auto'). react-ui/src/components/ApproveDevice.tsx:59
onApprove(): void;

Defined in: react-ui/src/components/ApproveDevice.tsx:46

void


onDeny(): void;

Defined in: react-ui/src/components/ApproveDevice.tsx:47

void