Authentication
3 min
min

Authentication

Two ways to authenticate

The Solsta CLI supports two authentication methods. Credentials are stored in your operating system's credential manager.

User Login

Use this method for individual users. Opens a browser window where you enter your organization name and credentials.

solsta_cli login prompt

A refresh token is stored locally after login. The token stays active as long as the CLI is used at least once every 30 days.

To keep tokens alive on machines that sit idle, create a scheduled task that runs solsta_cli local read daily.

Machine-to-Machine (M2M)

Use M2M credentials for unattended machines, CI/CD pipelines, or any environment where a browser login is not possible.

solsta_cli login client_credentials \  
--client_id=YOUR_CLIENT_ID \  
--client_secret=YOUR_CLIENT_SECRET

M2M credentials are created and managed in the Solsta Desktop Application under Machine Credentials. M2M tokens expire after 24 hours. Generate a fresh token per job in CI/CD pipelines.

Logout

Clears all local tokens. Requires a login before the next session.

solsta_cli logout
If the CLI runs at least once every 30 days, your token refreshes automatically and you will never need to log in again.