Skip to content
Open
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
"vite": "7.3.5",
"vite-tsconfig-paths": "6.1.1",
"vitest": "4.1.9",
"wrangler": "4.100.0",
"wrangler": "4.106.0",
"zod": "4.4.3"
},
"lint-staged": {
Expand Down
123 changes: 112 additions & 11 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions pnpm-workspace.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ minimumReleaseAge: 1440
# age guard so freshly-cut versions install without a 24h wait.
minimumReleaseAgeExclude:
- nimbus-docs
# First-party Cloudflare packages, published frequently. The docs site bumps
# Wrangler often to regenerate the autogenerated command reference, so exempt
# it (and its miniflare dependency) from the 24h wait.
- wrangler
- miniflare

# @astrojs/mdx's @astrojs/markdown-satteri peer is optional and only engages when
# markdown.processor is Sätteri (the Nimbus target, via nimbus-docs's pinned mdx
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
title: Work across multiple accounts with Wrangler auth profiles
description: Maintain separate logins and switch between Cloudflare accounts per project, without re-running wrangler login.
products:
- workers
date: 2026-06-30
---

Comment thread
MattieTK marked this conversation as resolved.
[Wrangler CLI](/workers/wrangler/) now supports auth profiles: named logins that you scope to specific Cloudflare accounts and switch between automatically, based on the directory you are working in.

A profile is a named OAuth login bound to a directory. Commands run in that directory, and its subdirectories, use the matching account — so you can move between accounts without re-running `wrangler login`.

Use profiles to keep a separate login for each client when working at an agency, or to separate staging and production into different accounts. Pair a profile with an `account_id` in your [Wrangler configuration file](/workers/wrangler/configuration/) so a command cannot reach the wrong account.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dinasaur404 for blog re: FGA


```sh
# Create a profile for each account, choosing which accounts it can reach
wrangler auth create client-a
wrangler auth activate client-a ~/clients/client-a

wrangler auth create client-b
wrangler auth activate client-b ~/clients/client-b
```

Use the `--profile` flag to run a single command with a specific profile:

```sh
wrangler deploy --profile personal
```

In CI and other automated environments, `CLOUDFLARE_API_TOKEN` still takes precedence over all profiles.
Comment thread
MattieTK marked this conversation as resolved.

For setup, the resolution order, and the full command reference, see [Authentication profiles](/workers/wrangler/profiles/).
12 changes: 12 additions & 0 deletions src/content/docs/workers/wrangler/commands/general.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ If you are using `CLOUDFLARE_API_TOKEN` instead of OAuth, and you can logout by

## `auth`

Manage authentication, including named [authentication profiles](/workers/wrangler/profiles/) for working across multiple accounts.

### `auth token`

Retrieve your current authentication token or credentials for use with other tools and scripts.
Expand Down Expand Up @@ -170,6 +172,16 @@ An error is returned if no authentication method is available, or if API key/ema

<Render file="wrangler-commands/global-flags" product="workers" />

<WranglerCommand command="auth create" headingLevel={3} />

<WranglerCommand command="auth activate" headingLevel={3} />

<WranglerCommand command="auth deactivate" headingLevel={3} />

<WranglerCommand command="auth list" headingLevel={3} />

<WranglerCommand command="auth delete" headingLevel={3} />

---

<WranglerCommand command="whoami" />
Expand Down
Loading