Skip to content

waitForDeviceAuthorization

waitForDeviceAuthorization(options): Promise<DeviceAccessTokenResponse | DeviceAccessTokenError>

Defined in: src/oauth/authorize.ts:232

Polls the OAuth2 token endpoint until we get a device access token response, or encounter an unrecoverable error.

The device authorization parameters.

string

The client ID returned from client registration.

ValidatedAuthMetadata

The validated OAuth2 metadata for the Identity Provider.

DeviceAuthorizationResponse

The session returned from a previous call to startDeviceAuthorization.

Promise<DeviceAccessTokenResponse | DeviceAccessTokenError>

a promise that resolves to a device access token response, or an error response if the user denies authorization or the device code expires.