fauna login
fauna login [flags]
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.
By default, fauna login runs and redirects to a
local HTTP callback server at 127.0.0.1 to receive an authentication code from
Fauna.
This approach may not work in environments where opening a browser isn’t possible or environments with an isolated network stack, such as Windows Subsystem for Linux (WSL) or other virtualized environments.
In these cases, use --no-redirect to manually generate and provide an
authentication code without redirects and a local callback server.
Flags
- Output
-
--color-
Enable color formatting for output. Enabled by default. Use
--no-colorto disable. --json-
Output results as JSON. This flag doesn’t affect error output.
--jsonhas no effect for this command. --quiet-
Suppress all log messages except fatal errors. Output only command results. Overrides
--verbosityand--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) to5(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.
-r,--redirect-
Log in using a local callback server (default). Use
--no-redirectif you are unable to open a browser on your local machine. See Log in without redirects. -u,--user <string>-
User to log in as. Defaults to
default.