Skip to content

enpxio auth login device

The Device Code Flow is used by browser-less or input-constrained devices in the device flow to exchange a previously obtained device code for an access token.

Synopsis

enpxio auth login device [--context CONTEXT_NAME] [-s SCOPE ...] [-a AUDIENCE] CLIENT_ID

Flags

--context CONTEXT_NAME
Performs the request using the specified context instead of the default context.
-s, --scopes ...
The OAuth scopes to request.
The scope offline_access, which is required for the Device Code Flow, gets added automatically.
Default: https://apis.enpowerx.io).
-a, --audience AUDIENCE
The OIDC audience to communicate against.
Default: https://apis.enpowerx.io).

Positional Arguments

CLIENT_ID
The OAuth client ID.

Example

enpxio auth login device $CLIENT_ID

Console Output:

Calling authorization server...
Please follow the link in your browser, login and confirm the consent.

URL: https://auth.enpowerx.io/activate?user_code=RSBL-QNXS
 Awaiting confirmation...

The device flow is initiated and your browser will be opened to to confirm the consent.

If the browser will not open, copy the printed URL and put it in your favorite browser.

After you have confirmed the consent, you will get the following console output:

authentication successful