Skip to content

DeviceEndpoint

Defined in: core/src/auth/device.ts:13

Where a vendor’s device flow lives, and what it wants on the wire.

clientId: string;

Defined in: core/src/auth/device.ts:18


deviceUrl: string;

Defined in: core/src/auth/device.ts:15

POST here to get a user code.


encode: "json" | "form";

Defined in: core/src/auth/device.ts:24


optional extra?: Record<string, string | boolean>;

Defined in: core/src/auth/device.ts:23

Extra fields on the code request only (xAI wants a referrer, OpenCode Console wants supports_org_scope: true).


optional scope?: string;

Defined in: core/src/auth/device.ts:20

Sent with the code request, for vendors that want scopes.


tokenUrl: string;

Defined in: core/src/auth/device.ts:17

POST here, again and again, until the user approves.