Creates a FaunaDB endpoint in the configuration file based on your FaunaDB credentials.
cloud-login command prompts you for your FaunaDB credentials, and
if you authenticate successfully, creates a
cloud endpoint in the
configuration file that you can use to query
your top-level FaunaDB database.
You can provide a secret instead of an email address. When you do so,
you are not prompted for a password, and a
cloud endpoint is created
in the configuration file that connects you to the database associated
with the secret.
cloud endpoint already exists when you run
are asked if you wish to overwrite the existing
Optional - The FaunaDB server domain, that is, the hostname where
FaunaDB is running. Defaults to
Optional - The name of the endpoint to use for the command.
Optional - The connection port. Defaults to 8443.
Optional - The connection scheme. Must be one of
Optional - The secret to use. A secret authenticates your connection to FaunaDB, and connects you to a specific database.
Optional - The connection timeout, an integer number of milliseconds.
When the specified period has elapsed,
The default is zero, which means that
The following example demonstrates the use of
cloud-login, and the
prompts for email/secret and password:
fauna cloud-login For email login, enter your email below, and then your password. For login with 3rd-party identity providers like Github or Netlify, please acquire a key from Dashboard > Security and enter it below instead. Email or secret key: <your email address> Password: ***********
After a successful login, your configuration
file now contains a
cloud endpoint that includes the secret to access
your top level database.
To see the configuration file, perform one of these steps:
On Linux, macOS, and other Unix-like operating systems, run the following command in a terminal:
On Windows, run the following command in a command terminal:
The configuration file should resemble:
default=cloud [cloud] domain=db.fauna.com scheme=https secret=fnADS@PxN@2CE@n7z@kDa4_p6Z@fIBaZm@Qt@bYT
Every secret provided by FaunaDB is unique, so the secret you see
when you run
Was this article helpful?
We're sorry to hear that.
Tell us how we can improve!
Thank you for your feedback!