---
title: tb login
meta:
    description: Authenticate with your Tinybird account
---

# tb login

Authenticates with your Tinybird account.

By default, the command opens a browser window for authentication. You can also use the `--method code` option to authenticate using a temporary code instead of a browser.

The credentials are stored in the `.tinyb` file. See [.tinyb file](/forward/dev-reference/datafiles/tinyb-file).

## Options

{% table %}
  * Option
  * Description
  ---
  * --host TEXT
  * Set a custom host if it's different than https://api.tinybird.co. Check [Regions and endpoints](/api-reference#regions-and-endpoints) for the available list of regions.
  ---
  * --auth-host TEXT
  * Set the host to authenticate to. If unset, the default host is used.
  ---
  * --workspace TEXT
  * Set the workspace to authenticate to. If unset, the default workspace is used.
  ---
  * -i, --interactive
  * Show available regions and prompts you to select one for authentication.
  ---
  * --method [browser|code]
  * Set the authentication method to use. Default: browser.
  ---
  * --use-aws-creds
  * Use AWS credentials to authenticate. Required to run S3 connections locally. See [Using AWS credentials](/forward/get-data-in/connectors/s3#using-s3-connector-local-environment).
{% /table %} 

To log out, run `tb logout`.

## Environment support

{% table %}
  * Environment
  * Supported
  * Description
  ---
  * `--local`
  * ✗ No
  * Authentication is global and applies to all environments.
  ---
  * `--cloud`
  * ✗ No
  * Authentication is global and applies to all environments.
  ---
  * `--branch=BRANCH_NAME`
  * ✗ No
  * Authentication is global and applies to all environments.
{% /table %}
