{
  "slug": "wrangler-login-supports-device-authorization-7b1c099124b4",
  "title": "wrangler login supports device authorization",
  "tools": [
    "wrangler"
  ],
  "tags": [
    "agent"
  ],
  "introduced_at": "2026-08-05T12:30:50.000Z",
  "announced_at": "2026-08-05T12:30:50.000Z",
  "effective_at": null,
  "date_basis": "source-publication",
  "status": "unknown",
  "how": {
    "incantation": "When the browser cannot reach Wrangler’s local `localhost:8976` callback, run `wrangler login --device` and approve the request using the printed verification URL and user code.",
    "examples": [
      "npx wrangler login --device",
      "npx wrangler login --device --browser=false"
    ],
    "gotchas": [
      "Version: 4.119.0",
      "--device: Defaults to `false`; uses OAuth 2.0 Device Authorization Grant instead of the default `localhost` callback flow.",
      "--browser: Boolean; defaults to `true`. Automatically opens the OAuth link. Set `--browser=false` to suppress opening it.",
      "--callback-host: Defaults to `localhost`; sets the callback listener host. Cannot be combined with `--device`.",
      "--callback-port: Defaults to `8976`; sets the callback listener port. Cannot be combined with `--device`.",
      "Device authorization polls the token endpoint until approval, with a 5-minute hard cap.",
      "The verification URL is rejected unless it is an `https` URL on the same auth domain the device code was requested from; an invalid URL is neither printed nor opened.",
      "`--callback-host` and `--callback-port` cannot be combined with `--device`, because this flow does not start a local callback server."
    ]
  },
  "why_it_matters": "Authenticate Wrangler from a container, remote SSH session, or Codespace where the browser cannot reach `localhost:8976`.",
  "before": "The default login flow uses a local callback server at `localhost:8976`; the browser must be able to reach it. In containers, the docs describe mapping port 8976 and setting `--callback-host=0.0.0.0` as a workaround.",
  "sources": [
    "https://github.com/cloudflare/workers-sdk/releases/tag/wrangler%404.119.0",
    "https://developers.cloudflare.com/workers/wrangler/commands/general/"
  ],
  "rank": 0.98029,
  "judge": {
    "publish": true,
    "judge_model": "codex-cli/gpt-6-luna+typesafe/jev-1.13.0",
    "prompt_version": "extract-v7+enrich-v1+judge-v2x3+jev-publish-v1"
  },
  "review_state": "approved",
  "provenance": {
    "run_id": "augsep-20261008",
    "verdict_id": "augsep-20261008:augsep-20261008-4a991e0a71da50a6-2:gate",
    "evidence_hash": "134e4e5993577e831ccb0b0688252d1f4299f551ae281fb9b86899b9964dda69"
  },
  "review": {
    "draft_hash": "bb05b7fadcee535cf6cc58ba77a327e0a4791a4aa28cc1476a1241c4d37535ad",
    "reviewer": "publication-gate",
    "reviewed_at": "2026-10-07T00:00:00.000Z",
    "decision": "augsep-20261008:gate",
    "reason": "3 of 3 judge runs approved with p_yes >= 0.9 (mean 0.98 >= 0.9; 2 needed) and Jev gave 0.77 (>= 0.6 needed)."
  }
}
