> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cloudstic.com/llms.txt
> Use this file to discover all available pages before exploring further.

# cloudstic auth login

> Run OAuth login flow for one auth entry

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

```bash theme={null}
cloudstic auth login [options]
```

## Options

<ParamField path="-name" type="string" required>
  Auth reference name. Must match an existing entry in the profiles file.
</ParamField>

<ParamField path="-profiles-file" type="string" env="CLOUDSTIC_PROFILES_FILE">
  Path to the profiles YAML file.
</ParamField>

## Examples

```bash theme={null}
# Login to a Google auth entry
cloudstic auth login -name google-main

# Login to a OneDrive auth entry
cloudstic auth login -name onedrive-personal
```

## Output

On success:

```
Auth "google-main" is ready
```

## 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)

<Tip>
  You only need to run `auth login` once per auth entry. Tokens are automatically refreshed on subsequent backups.
</Tip>

## See Also

* [cloudstic auth new](/commands/auth-new): Create an auth entry
* [cloudstic auth list](/commands/auth-list): List auth entries
* [Custom OAuth Clients](/guides/custom-oauth-clients): Use your own OAuth credentials
* [Using Profiles](/guides/profiles): Complete profiles guide
