Skip to main content
Trigger the OAuth authorization flow for a named auth entry. This opens your browser for authentication and saves the access token to the configured token file.

Usage

In interactive mode, if no name is provided, you’ll be prompted to select from available auth entries.

Options

string
Auth reference name. Must match an existing entry in the profiles file. Also accepted as a positional argument (cloudstic auth login google-main). If omitted, you’re prompted to pick one; in a non-interactive shell the command exits with an error instead.
string
Path to the profiles YAML file.

Examples

Output

On success, the command reports the account it authenticated as, followed by the source type (gdrive or onedrive):

Credential Resolution

auth login resolves credentials in this order:
  1. Credentials stored in the auth entry (e.g., google_credentials path)
  2. Environment variables (GOOGLE_APPLICATION_CREDENTIALS, ONEDRIVE_CLIENT_ID)
  3. Built-in OAuth credentials (default)
You only need to run auth login once per auth entry. Tokens are automatically refreshed on subsequent backups.

See Also