# ApproveDeviceProps

<!-- https://uncage.vercel.app/docs/api/react-ui/interfaces/approvedeviceprops/ -->

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

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="property-classname"></a> `className?` | `string` | - | react-ui/src/components/ApproveDevice.tsx:60 |
| <a id="property-code"></a> `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 |
| <a id="property-error"></a> `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 |
| <a id="property-locale"></a> `locale?` | [`Locale`](https://uncage.vercel.app/docs/api/react-ui/type-aliases/locale.md) | UI language (default: the surrounding `UncageUIProvider`, else `'en'`). | react-ui/src/components/ApproveDevice.tsx:57 |
| <a id="property-lookup"></a> `lookup` | \| [`DeviceLookupInfo`](https://uncage.vercel.app/docs/api/react-ui/interfaces/devicelookupinfo.md) \| `null` | `hub.lookupDevice(code, user)`; `null` = unknown, used or expired code. | react-ui/src/components/ApproveDevice.tsx:45 |
| <a id="property-source"></a> `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 |
| <a id="property-state"></a> `state?` | [`ApproveDeviceState`](https://uncage.vercel.app/docs/api/react-ui/type-aliases/approvedevicestate.md) | Default `'idle'`. | react-ui/src/components/ApproveDevice.tsx:49 |
| <a id="property-theme"></a> `theme?` | `"auto"` \| `"light"` \| `"dark"` | Sets `data-theme` on the root (default `'auto'`). | react-ui/src/components/ApproveDevice.tsx:59 |

## Methods

### onApprove()

```ts
onApprove(): void;
```

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

#### Returns

`void`

***

### onDeny()

```ts
onDeny(): void;
```

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

#### Returns

`void`
