-
Notifications
You must be signed in to change notification settings - Fork 329
Document browser-based device authorization for CLI login #3130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| --- | ||
| layout: post | ||
| title: "Announcing Device Authorization for the Appwrite CLI: Log in from your browser" | ||
| description: The Appwrite CLI now signs you in through your browser. Confirm a device code, review permissions, and authorize, without typing credentials into your terminal. | ||
| date: 2026-07-29 | ||
| cover: /images/blog/announcing-cli-device-authorization/cover.avif | ||
| timeToRead: 4 | ||
| author: chirag-aggarwal | ||
| category: announcement | ||
| featured: false | ||
| callToAction: true | ||
| faqs: | ||
| - question: "What is Device Authorization in the Appwrite CLI?" | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should include OAuth |
||
| answer: "Device Authorization is the new login flow for the Appwrite CLI. Instead of prompting for your credentials in the terminal, the CLI shows a code and a URL. You confirm the code in your browser, review the requested permissions, and authorize the CLI with your Appwrite account." | ||
| - question: "Which command starts the new login flow?" | ||
| answer: "The same command as before: `appwrite login`. If you use a self-hosted instance, add the `--endpoint` flag with your instance URL. The only thing that changes is what happens after you run it." | ||
| - question: "What permissions does the Appwrite CLI request?" | ||
| answer: "The authorization screen lists the exact access you grant: viewing your identity and fully managing your Appwrite account on your behalf. You review and approve these permissions in the browser before the CLI can act." | ||
| - question: "How do I revoke the CLI's access to my account?" | ||
| answer: "You can revoke access anytime from your Appwrite account settings. Once revoked, the CLI can no longer act on your behalf until you authorize it again." | ||
| - question: "Does the new login flow affect CI pipelines?" | ||
| answer: "No. Non-interactive mode, which authenticates with an API key through `appwrite client`, is unchanged and remains the recommended approach for CI and scripting." | ||
| --- | ||
|
|
||
| Signing in to a CLI should not mean typing your account password into a terminal prompt. Your identity already lives in your browser, and that is where authentication should happen. | ||
|
|
||
| Today, we are announcing **Device Authorization** for the Appwrite CLI. Running `appwrite login` now hands the sign-in process to your browser, so you can authenticate the CLI with the account session you already trust. | ||
|
|
||
| # How it works | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should probably add an info note at the end or a subsection that clarifies that existing API key based auth and flows won't break and that they are still recommended for CI workflows, etc.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should also be more explicitly covered in the docs |
||
|
|
||
| The new flow follows the OAuth 2.0 device authorization pattern. Run `appwrite login`, and the CLI displays a device code and a URL, then waits for approval. | ||
|
|
||
|  | ||
|
|
||
| Press Enter to open the URL, or copy it into any browser. Confirm the code on the page matches the one in your terminal and click **Continue**. | ||
|
|
||
|  | ||
|
|
||
| Review the permissions the CLI requests and click **Authorize**. Once approved, the CLI detects the authorization and finishes signing you in. | ||
|
|
||
|  | ||
|
|
||
| # Consent you can see | ||
|
|
||
| Before the CLI can act on your behalf, the browser shows you exactly what access you are granting: viewing your identity and fully managing your Appwrite account. | ||
|
|
||
| Authorization is also reversible. You can revoke the CLI's access anytime from your Appwrite account settings. | ||
|
|
||
| # Get started | ||
|
|
||
| Update the Appwrite CLI to the latest version and run: | ||
|
|
||
| ```sh | ||
| appwrite login | ||
| ``` | ||
|
|
||
| The [CLI installation guide](/docs/tooling/command-line/installation#login) walks through every step with screenshots. | ||
|
|
||
| # More resources | ||
|
|
||
| - [Introducing generate command in the Appwrite CLI: Create a type-safe SDK from your schema](/blog/post/appwrite-generate) | ||
| - [Announcing the Projects API: Configure your project with Server SDKs](/blog/post/announcing-projects-api) | ||
| - [Announcing the Keys API: Create and manage API keys with Server SDKs](/blog/post/announcing-api-keys-api) | ||
| - [Join the Appwrite Community on Discord](https://appwrite.io/discord) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| --- | ||
| layout: changelog | ||
| title: Browser-based login for the Appwrite CLI | ||
| date: 2026-07-29 | ||
| cover: /images/blog/announcing-cli-device-authorization/cover.avif | ||
| --- | ||
|
|
||
| `appwrite login` now signs you in through your browser using device authorization. The CLI displays a code and a URL, you confirm the code and approve the requested permissions in the browser, and the terminal completes the login automatically. | ||
|
|
||
| Authorization uses your Console session, and you can revoke the CLI's access anytime from your account settings. Update to the latest version of the CLI to get the new flow. Non-interactive mode with API keys for CI is unchanged. | ||
|
|
||
| {% arrow_link href="/blog/post/announcing-cli-device-authorization" %} | ||
| Read the announcement | ||
| {% /arrow_link %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need a cover sorted out