[Workers] Document Wrangler auth profiles#31774
Conversation
|
This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:
|
|
Recommended labels: SummaryThis PR adds user-facing documentation for Wrangler authentication profiles (shipping in Wrangler
Overall, the content is well-structured, provides practical examples (agency multi-client work and staging/production separation), and appropriately flags the beta status. Good work. Issues that need attention before merge1. Grammar typo in - A profile is a named OAuth login that you scope to a chosen set of accounts can bind to a directory.
+ A profile is a named OAuth login that you scope to a chosen set of accounts and bind to a directory.2. Pre-merge dependency: Wrangler version bump 🔴 3. Changelog date confirmation 🔴 4. Consider adding 5. 6. Unchecked documentation checklist item VerdictApprove after addressing items 1–3 (grammar fix, wrangler bump, and date confirmation). The rest are optional suggestions. |
irvinebroque
left a comment
There was a problem hiding this comment.
👏 👏 👏
stamp so you have it, see comments
worth considering calling out in blog too (but not blocking on blog)
| - workers | ||
| date: 2026-06-30 | ||
| --- | ||
|
|
There was a problem hiding this comment.
Might want a "You can now..." sentence here so that this leads with what you can now do, rather than starting with what you used to not be able to do
|
|
||
| A profile is a named OAuth login that you scope to a chosen set of accounts and bind to a directory. Commands run in that directory, and its subdirectories, use the matching account automatically. | ||
|
|
||
| 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. |
| wrangler deploy --profile personal | ||
| ``` | ||
|
|
||
| In CI and other automated environments, `CLOUDFLARE_API_TOKEN` still takes precedence over all profiles. |
There was a problem hiding this comment.
Is this only true in non-interactive environments, or is it always the case regardless of env?
There was a problem hiding this comment.
This is the case regardless so we can probably remove this line, it's more for safety to be like "don't worry, this won't interfere".
Co-authored-by: Brendan Irvine-Broque <brendanib@gmail.com>
Summary
Adds user-facing documentation for Wrangler authentication profiles (workers-sdk #14200, RFC #14161).
Profiles let you keep separate OAuth logins scoped to specific accounts and bind them to directories, so you can work across multiple Cloudflare accounts without re-running
wrangler login— for example, a separate login per client at an agency, or account-separated staging and production withaccount_idas a failsafe.This PR adds:
/workers/wrangler/profiles/covering when to use profiles, the resolution order, account selection, and the create / activate / switch / list / remove workflow.Before merging — update Wrangler in this repo. The
wrangler authcommand reference (auth create,auth activate,auth deactivate,auth list,auth delete) autogenerates from the installedwranglerpackage viaexperimental_getWranglerCommands(). These commands are not in any published Wrangler yet — the latest is4.105.0, and the feature merged after it, shipping in4.106.0. Once4.106.0is on npm:wranglerdevDependency inpackage.json.<WranglerCommand command="auth …" headingLevel={3} />entries under theauthsection incommands/general.mdxso the command reference populates (this also renders the--profileglobal flag and the "Experimental" badge automatically).The guide currently links to the
#authsection anchor, which already exists, so internal links resolve in the meantime. The changelogdateshould also be confirmed against the actual4.106.0release date.Documentation checklist