Skip to content

pollDeviceToken

function pollDeviceToken(
host,
endpoint,
prompt,
signal
): Promise<Record<string, unknown>>;

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

Step 2: poll until the user approves, and return the raw token body. Turning it into a credential is the caller’s job, because the bodies differ: GitHub answers with a bare token and no expiry, Meta with an identity token that still has to be traded for a key.

Parameter Type
host AuthHost
endpoint DeviceEndpoint
prompt DevicePrompt
signal AbortSignal

Promise<Record<string, unknown>>