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

# porter auth

> Authenticate with Porter using browser-based login, token-based authentication for CI/CD pipelines, or manual email and password via the CLI

`porter auth` contains commands for authenticating with Porter.

***

## `porter auth login`

Authenticate with your Porter account. By default, this opens your browser to complete authentication.

**Usage:**

```bash theme={null}
porter auth login [flags]
```

**Options:**

| Flag      | Description                    |
| --------- | ------------------------------ |
| `--token` | Log in using an existing token |

<CodeGroup>
  ```bash Browser Login (Default) theme={null}
  porter auth login
  ```

  ```bash Token Login theme={null}
  porter auth login --token <YOUR_TOKEN>
  ```
</CodeGroup>

<Info>
  After logging in, Porter automatically sets your default project and cluster if you have access to any. You can view these with `porter config`.
</Info>

***

## `porter auth logout`

Log out from Porter and clear your local credentials.

**Usage:**

```bash theme={null}
porter auth logout
```

<Tip>
  After logging out, you'll need to run `porter auth login` again before using other commands.
</Tip>
