Authenticating with the cuttle CLI

How to authenticate with the cuttle CLI.

To authenticate using the cuttle command, execute the following command:

$ cuttle auth login
Please log in in the newly opened browser tab and confirm verification code:  PFDT-BHFD
Waiting for successful authentication...
ConfirmDevice

Confirm button of the Device Confirmation pane.

confirm the verification code above matches the one on the browser and finish the oAuth step with your Authenticator app on your phone.

Success

Successful authentication of your account.

After successful authentication, cuttle will store refresh tokens in local config. It will use them to obtain fresh auth tokens when accessing EdgeLQ. However, when refresh tokens eventually expire, you will get errors like these:

request failed: rpc error: code = Unauthenticated desc = transport: per-RPC creds failed due to error: oauth2: "invalid_grant" "Unknown or invalid refresh token."

In that case, you will need to use the cuttle auth login command again.

If you have multiple accounts, it is advisable to specify which account you refresh with:

cuttle auth login --account-name <AccountName>`

This account name may usually have email format xyz@mail.com, but verify with cuttle config account list.

To verify current account you are using, you can list current contexts and see which one is ACTIVE - it will show associated account name: cuttle config context list.