# `bird auth`

## Usage

```bash
bird auth
```

## Description

Create a Bird account, sign in, sign out, and check Bird API credentials.

No account yet? The PROCEDURE below creates one without a browser: sign up,
verify the emailed code, then create-org with --region to pick where the
account lives.

Already have an account? bird auth login signs in through the browser (or
--device for headless), issuing a workspace-scoped OAuth token.

## Procedure

**Sign up and create your first organization**

Sign up passwordlessly with the six-digit code emailed to the address, then create the first organization, which mints and stores your API credential. Fully browserless: no dashboard and no password needed. Signup and verification are region-agnostic; the region is chosen when you create the organization.

1. `bird auth signup` — Emails a six-digit code to the address; no password is set. Read the six-digit code from the sign-in email. Next: bird auth verify-email
2. `bird auth verify-email` — Signs in with the email and the emailed code; for a brand-new account returns a single-use onboarding_ticket. Next: bird auth create-org
3. `bird auth create-org` — Creates the organization and first workspace and stores the minted credential, so subsequent calls are authenticated.

## Session

| Name                                        | Description                                                              |
| ------------------------------------------- | ------------------------------------------------------------------------ |
| [`login`](/docs/cli/reference/auth-login)   | Authenticate with Bird through your browser (OAuth)                      |
| [`logout`](/docs/cli/reference/auth-logout) | Revoke the OAuth grant (if any) and remove the stored credentials file   |
| [`status`](/docs/cli/reference/auth-status) | Show current authentication state and validate the token against the API |

## Onboarding

| Name                                                    | Description                                                           |
| ------------------------------------------------------- | --------------------------------------------------------------------- |
| [`signup`](/docs/cli/reference/auth-signup)             | Start a passwordless Bird signup and email a six-digit code.          |
| [`verify-email`](/docs/cli/reference/auth-verify-email) | Confirm the emailed six-digit code and sign in.                       |
| [`create-org`](/docs/cli/reference/auth-create-org)     | Create the first organization and workspace and mint your credential. |