Log in to Cloudflare with OAuth
setup & auth
// what it does
Opens the Cloudflare OAuth consent page in your browser and caches a refreshable token, so every later command (dev, deploy, kv, d1...) is authenticated. Run it once per machine when setting up wrangler on a new laptop. Add `--scopes-list` to see grantable scopes, or `--scopes ...` to narrow them.
// shell
$ wrangler login// gotcha
The browser flow can't run over SSH or in CI. On a headless box use `--browser false`; for automation export a CLOUDFLARE_API_TOKEN instead (next entries).