sincecutoff.com
← all changes

wrangler auth profiles bind OAuth logins to directories

Introduced 2026-06-30 · score 0.98

HOW TO USE IT

When projects need separate Cloudflare OAuth logins, create a named profile and bind it to each project directory; bindings apply to subdirectories. Use `--profile` for a one-command override, and account ID settings remain respected.

wrangler auth create <name> wrangler auth activate <name> <directory>
wrangler auth list wrangler auth deactivate <directory> wrangler auth delete <name>
wrangler <command> --profile <name>

WHY THIS HELPS

Use separate Wrangler OAuth logins for projects in different directories while retaining existing token and account settings.

REQUIREMENTS AND LIMITATIONS

  • Version: wrangler@4.106.0
  • <name> (required): Profile name to create, activate, or delete; creation starts OAuth login.
  • [dir]: Directory to bind or deactivate; activation defaults to the current working directory, and the binding applies to subdirectories.
  • --profile <name>: Select a profile for one command run without changing directory bindings.
  • CLOUDFLARE_API_TOKEN: When set, takes precedence over profiles.
  • CLOUDFLARE_ACCOUNT_ID: Account ID setting respected when resolving the target account.
  • account_id: Wrangler configuration setting respected when resolving the target account.
  • Prerequisite: Creating a profile starts an OAuth flow; choose which accounts the profile may reach.
  • `wrangler auth create <name>` creates or re-authenticates a named profile via OAuth.
  • `wrangler auth activate <name> [dir]` defaults to cwd; subdirectories inherit the profile.
  • `CLOUDFLARE_API_TOKEN` takes precedence over profiles when set.
  • Account ID settings via `CLOUDFLARE_ACCOUNT_ID` or Wrangler config continue to be respected.
  • Docs conflict: The documentation was updated Sep 17, 2026, after Wrangler 4.106.0. It says that when CLOUDFLARE_API_TOKEN is set, profile create, activate, deactivate, and delete commands cannot be used; the release note states token precedence but does not mention this restriction.

FIRST-PARTY EVIDENCE

Check the installed version and the source before using it. Entry JSON

Report a problem with this card