DevelopersDevice sign-in and approval

Device sign-in and approval

How command-line tools sign in through your browser, and the approval some actions need.

Reference1 min read

Command-line tools sign in without a pasted token. The tool asks CodePinion for a short code, you approve the code in a browser where you are already signed in, and the token is delivered straight to the tool.

Approving a sign-in

Steps

  1. The tool shows a short code and opens /device (requires sign-in) in your browser.
  2. Check the machine and IP address the request came from, and that the code matches.
  3. Approve it. The tool is signed in.

Deny any request you did not start.

Because you approve in a browser that already passed CodePinion's emailed sign-in code, the tool's token carries that proof, and no token ever appears in your shell history, terminal scrollback or a chat transcript.

Step-up approval

Where a CodePinion deployment turns it on, tools can always read, but changing something needs a browser approval from the last 12 hours. When a tool hits that, approve it the same way (with the CLI, cp.py elevate) and carry on.

Revoking

Tokens created this way are listed in API tokens (requires sign-in). Revoke one to sign that tool out.