fauna login

fauna login [flags]

Interactive login is not currently supported on Windows Subsystem for Linux (WSL). Use an alternative authentication method, such as account keys or secrets.

Log in to Fauna using a web-based browser flow.

This command is used to set up authentication using an interactive login.

If you’re using the CLI for scripts, CI/CD, or other automated workflows, we recommend using account keys, secrets, or a local Fauna container instead. See Authentication.

Use --user to specify a user to log in as. If omitted, --user defaults to default.

The --user argument can be any string. --user is only used by the CLI to store and retrieve Fauna account keys. The --user is not passed to Fauna itself. See How interactive login works.

After logging in, you can authenticate other CLI commands by specifying the --user, a --database, and an optional --role.

You can’t use this command to log in to or authenticate with a local Fauna container. See local Fauna container authentication.

Flags

Output
--color

Enable color formatting for output. Enabled by default. Use --no-color to disable.

--json

Output results as JSON.

--quiet

Suppress all log messages except fatal errors. Output only command results. Overrides --verbosity and --verbose-component.

Config
--config <string>

Path to a CLI config file to use. If provided, must specify a profile.

-p, --profile <string>

Profile from the CLI config file. A profile is a group of CLI settings.

Debug
--verbose-component <array>

Components to emit logs for. Overrides --verbosity.

Accepts the following values:

  • argv

  • config

  • creds

  • error

  • fetch

Pass values as a space-separated list. Example: --verbose-component argv config.

--verbosity <number>

Least critical log level to emit. Accepts integers ranging from 1 (fatal) to 5 (debug). Lower values represent more critical logs. Log messages with a level greater than this value are not logged.

Options
-h, --help

Show help.

--version

Show the Fauna CLI version.

-u, --user <string>

User to log in as. Defaults to default.

Examples

# Log in as the 'default' user.
fauna login

# Log in as the `john_doe` user.
fauna login --user john_doe

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!