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.
Parameters
Section titled “Parameters”options
Section titled “options”The device authorization parameters.
clientId
Section titled “clientId”string
The client ID returned from client registration.
metadata
Section titled “metadata”The validated OAuth2 metadata for the Identity Provider.
session
Section titled “session”The session returned from a previous call to startDeviceAuthorization.
Returns
Section titled “Returns”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.