Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions guides/cli/cli-authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ icon: "key"
## Login

<AccordionGroup>
<Accordion title="1. You can login on the CLI from your browser using OAuth2.">
To log in to your Lightdash instance using OAuth2, run the following command:
<Accordion title="1. Login from your browser using OAuth2 (default)">
To log in to your Lightdash instance, run the following command:

```bash
lightdash login https://{{ lightdash_domain }} --oauth
lightdash login https://{{ lightdash_domain }}
```

where `{{ lightdash_domain }}` is the address for your running Lightdash instance. For example Lightdash cloud users in the US would type `lightdash login https://app.lightdash.cloud` if you're in Europe you'd type`lightdash login https://eu1.lightdash.cloud`.

This will open a new tab in your default browser. Log in to your Lightdash account (if you're not already logged in), then authorize the lightdash-cli client.

Once authorized, youll be logged in and ready to use the CLI.
Once authorized, you'll be logged in and ready to use the CLI.

<Frame>
<img src="images/oauth-authorize.png" alt="" />
Expand All @@ -27,14 +27,8 @@ Once authorized, you’ll be logged in and ready to use the CLI.

</Accordion>

<Accordion title="2. If you use your email + password in the browser, login with your email and password.">
To login to your Lightdash instance run the following command and provide your login email and password:

```bash
lightdash login https://{{ lightdash_domain }}
```

where `{{ lightdash_domain }}` is the address for your running Lightdash instance. For example Lightdash cloud users in the US would type `lightdash login https://app.lightdash.cloud` if you're in Europe you'd type`lightdash login https://eu1.lightdash.cloud`.
<Accordion title="2. (Deprecated) Email + password authentication">
<Warning>Password authentication is deprecated and no longer supported. Please use OAuth2 or personal access tokens instead.</Warning>
</Accordion>

<Accordion title="3. If you use single sign-on (SSO) in the browser, login with a personal access token.">
Expand Down Expand Up @@ -108,4 +102,4 @@ Some of our favourites are:

* [Testing your changes with developer previews using lightdash preview](/guides/cli/how-to-use-lightdash-preview)

* [Deploying your changes to production using lightdash deploy](/guides/cli/how-to-use-lightdash-deploy)
* [Deploying your changes to production using lightdash deploy](/guides/cli/how-to-use-lightdash-deploy)