Packages

@cloudflare/workers-auth

0.18.6 · 20 Nov 2026MIT OR Apache-2.0565.1k / weekRepositoryHomepagenpmAtom feed

Your version

65 stable releases, newest first, by release line. Notes are quoted as the maintainers published them.

  1. 0.18.x · latest line
  2. 0.18.6

    20 Nov 2026
    • Security

      Update Undici to 7.30.2 to include upstream security fixes

      This patch includes six upstream security fixes covering caching, redirects, and Subresource Integrity verification. Update the shared Undici dependency and matching types together so affected packages ship the patched version.

  3. 0.18.5

    18 Nov 2026
    • Fix Dynamic require errors when importing packages from ES modules

      Importing these packages in a Node.js ES module could fail with Dynamic require of "..." is not supported when a dependency loaded a Node.js built-in. These imports now work without requiring a CommonJS wrapper.

  4. 0.18.3

    16 Nov 2026
    • Avoid redundant OAuth refreshes after a sibling process updates credentials

      Check access-token expiry and select the refresh token from the same fresh credential snapshot. When a sibling has already saved a valid access token, reuse it without another exchange or write. This prevents an unnecessary rotation that can let an older response overwrite a newer refresh token.

  5. 0.18.1 – 0.18.22 releases that only update dependencies@cloudflare/workers-utils 0.54.0DEFAULT_COMPAT_DATE 2026-11Show each
  6. 0.18.0

    10 Nov 2026
    • Add custom Cloudflare API headers through CLOUDFLARE_API_HEADERS

      Set CLOUDFLARE_API_HEADERS to a JSON object such as {"X-Custom-Header":"value"} to add headers to Cloudflare API requests. Custom headers override existing unprotected request headers, body and transport headers are protected, and header values outside the diagnostic allowlist remain redacted regardless of log sanitization settings.

  7. 0.17.x
  8. 0.17.0

    9 Nov 2026
    • Stop persisting account selections made by cf and the Cloudflare Vite and Vitest plugins

      Profiles continue to select credentials rather than accounts. If the active credentials can access one account, it is selected automatically. If they can access multiple accounts, cf and the Vite and Vitest plugins reuse the selection while running but ask again the next time they start. Configure accountId in cloudflare.config.ts or set the CLOUDFLARE_ACCOUNT_ID environment variable to avoid repeated prompts.

      Wrangler's existing persistent account selection remains unchanged.

    • Support CLOUDFLARE_AUTH_PROFILE for shared authentication profile selection

      Cloudflare tooling can pass a selected profile to child processes through CLOUDFLARE_AUTH_PROFILE. Explicit profile arguments take precedence over the variable, followed by directory bindings and the default profile. The cf-wrangler development delegate also initializes cf authentication so it reads the selected cf credentials.

      Experimental cf development delegates inherit the selected profile without additional command-line flags. Vite refreshes remote authentication when the resolved profile changes, and cf-wrangler keeps its authentication scoped to the delegate invocation.

  9. 0.16.x
  10. 0.16.0

    5 Nov 2026
    • Correct and request the PlanetScale setup scope in new cf OAuth logins

      Use the policy-compliant hyperdrive-planetscale.setup identifier for the PlanetScale setup scope and request it in new cf OAuth logins by default. OAuth grants remain constrained by the user's permissions, so only users with the corresponding Bach membership permission can exercise it. Existing sessions must authenticate again to receive the scope.

  11. 0.15.x
  12. 0.15.5 – 0.15.62 releases that only update dependencies@cloudflare/workers-utils 0.51.1DEFAULT_COMPAT_DATE 2026-11Show each
  13. 0.15.4

    1 Nov 2026
    • Request the user API token management scope when logging in with cf

      Include user-api-tokens.write in cf's default OAuth scopes so users can list and manage their user API tokens, including when they have reached the token creation limit. Existing OAuth sessions need a new login to request the scope.

    • Validate OAuth error callbacks against the pending login

      All authorization callbacks, including ones without a code or error, now require the matching login state. Unrelated callbacks leave the login running so the authorization page can complete it, and control characters in provider error messages are displayed as escaped text.

  14. 0.15.2 – 0.15.32 releases that only update dependencies@cloudflare/workers-utils 0.50.1Show each
  15. 0.15.1

    26 Oct 2026
    • Update Undici to 7.30.1 to prevent a malformed HTTP response from crashing development tools

      The updated shared dependency rejects excessive content encodings without leaving an unhandled stream error when the server closes the connection early. This fixes GHSA-xjj6-f33q-929c and keeps the matching Undici types on the same version.

    • Fix the Windows keyring install when the config path contains a space

      On Windows, wrangler login --use-keyring could not set up keyring storage when the configuration path contained a space, such as a C:\Users\John Smith profile, so credentials fell back to the plaintext file. Keyring setup now works for those paths and credentials are stored encrypted.

  16. 0.15.0

    22 Oct 2026
    • Use each CLI's temporary-account flag in authentication errors

      Default to --temporary-account while keeping Wrangler's --temporary spelling. Expose account-lookup authentication failure reasons so consumers can distinguish missing credentials from expired tokens without matching error messages.

  17. 0.14.x
  18. 0.14.1

    20 Oct 2026
    • Support Vitest 5 in shared test helpers

      The optional Vitest peer ranges now accept both Vitest 4 and 5, allowing consumers to upgrade without dropping compatibility with Vitest 4.

  19. 0.14.0

    13 Oct 2026
    • Allow cf consumers to explicitly request the hyperdrive-planetscale:setup OAuth scope

      The scope remains excluded from default logins so permission to create Cloudflare-billed PlanetScale databases is requested only by commands that need it.

    • Use consumer-specific CLI names and commands in shared user-facing messages

      Shared deployment, container, configuration, and authentication helpers can now render commands and configuration filenames for their calling CLI while preserving Wrangler-compatible defaults. This prevents cf workflows from presenting Wrangler-branded guidance when an equivalent cf command exists.

    • Time out the OAuth token request instead of waiting indefinitely

      The request that exchanges an authorization code or refresh token for an access token had no timeout, so a stalled connection (for example behind an HTTP proxy) could leave wrangler login hanging silently for many minutes after the browser step had succeeded. The request now gives up after 30 seconds and reports that the Cloudflare auth server could not be reached.

  20. 0.13.x
  21. 0.13.1

    8 Oct 2026

    Only updates a dependency:@cloudflare/workers-utils 0.47.1

  22. 0.13.0

    6 Oct 2026
    • Add a temporaryAccountLogger option for temporary-account notices

      AuthContext.temporaryAccountLogger receives the terms notice, the proof-of-work message, and the "Temporary account ready" claim details. A CLI whose commands write parseable output to stdout can route these messages to stderr. When it is not set, the messages go to logger as before.

  23. 0.12.x
  24. 0.12.0

    2 Oct 2026
    • Allow cf to request the zone observability OAuth scopes

      New cf OAuth logins request zone-observability.read and zone-observability.write. Existing sessions must authenticate again to receive them.

  25. 0.11.x
  26. 0.11.1

    1 Oct 2026

    Only updates a dependency:@cloudflare/workers-utils 0.45.1

  27. 0.11.0

    30 Sep 2026
    • Allow cf to request the K2 OAuth scopes

      New cf OAuth logins request k2.consume, k2.produce, k2.read, and k2.write, which are registered for the cf OAuth client. Existing sessions must authenticate again to receive them.

  28. 0.10.x
  29. 0.10.0

    30 Sep 2026
    • Allow cf to request the account token creation scope

      New cf OAuth logins can request account_api_tokens:create. Existing sessions must authenticate again to receive the scope.

    • Add beta K2 producer bindings for existing streams

      Configure a stream created through Wrangler, the Dashboard, or the API in wrangler.json:

      {
        "k2": [
          {
            "binding": "ORDERS",
            "stream": "0123456789abcdef0123456789abcdef"
          }
        ]
      }

      The binding supports env.ORDERS.send([{ content: new TextEncoder().encode("order"), headers: { event: "order.created" } }]). Batches use either all ArrayBuffer or all Uint8Array content. Check the returned success value, handle rejected RPC promises, and retry only when the returned error explicitly allows it. Generated environment types describe this producer contract without requiring a separate application dependency.

      K2 requires an enabled account. Deployment credentials need Worker deployment and K2 configuration-read access. Default Wrangler logins now request the K2 OAuth scopes; existing OAuth users should run wrangler login again to grant the new permissions. Development always uses a real K2 stream and may incur usage charges; no local simulator is provided. The remote setting can be omitted, remote: true suppresses the usage warning, and remote: false is rejected. Consumption is not part of this Worker binding.

    • Add beta K2 stream management commands

      Use wrangler k2 streams create order_events, wrangler k2 streams list, wrangler k2 streams get <stream-id>, and wrangler k2 streams delete <stream-id> to manage K2 streams. Creation enables Worker bindings but not HTTP ingestion by default, matching the dashboard. Pass --http-enabled to enable authenticated HTTP ingestion and print its endpoint. Creation prints the stream ID and a binding configuration with a YOUR_BINDING_NAME placeholder for the Worker's variable name, but does not edit the configuration file automatically.

      All four commands support --json. Deletion requires confirmation, or --force/-y to skip it; use --force --json for JSON deletion output. Creation also accepts retention, HTTP authentication, Worker-input, and CORS options; listing supports pagination and a name filter. Default Wrangler logins now request k2.read and k2.write; existing OAuth users should run wrangler login again, or use a custom API token granting K2 Config Write. The account must be enabled for K2.

  30. 0.9.x
  31. 0.9.5

    29 Sep 2026
    • Report an unreachable auth server instead of an expired login when refreshing an OAuth token

      When the OAuth token endpoint could not be reached (for example a DNS failure or a connection timeout), the refresh failure was reported as "Your auth token has expired and could not be refreshed", with advice to run wrangler login; in an interactive terminal Wrangler also started a new browser login. A network failure says nothing about the stored refresh token, and a new login would need the same unreachable server. Wrangler now reports that the Cloudflare auth server could not be reached, leaves the stored credentials unchanged, and does not start a login, so the next run can refresh with the same token once the network is back.

  32. 0.9.4

    25 Sep 2026
    • Keep Node.js ESM packages working when consumers rebundle them as CommonJS

      Node.js-targeted ESM bundles now provide a real require implementation for bundled CommonJS dependencies. This avoids downstream patches for dynamic require calls and keeps the packages usable when a consumer rebundles them to CommonJS.

  33. 0.9.3

    25 Sep 2026

    Only updates a dependency:@cloudflare/workers-utils 0.43.0

  34. 0.9.2

    24 Sep 2026
    • Update smol-toml to 1.9.0 to fix slow parsing of very large TOML files

      Parse time for TOML config files now grows linearly with their size, instead of with its square: a 40,000-line file that took 259 ms to parse now takes 17 ms, while typical wrangler.toml files parse in the same time as before. This addresses the GHSA-r4xh-jqrq-34v2 advisory against earlier versions of the parser.

      Some TOML syntax errors now point at the character that caused them. For example, a wrangler.toml containing INVALID "FILE is now reported as illegal character in key at the ", rather than incomplete key-value at the start of the line.

  35. 0.9.1

    24 Sep 2026

    Only updates a dependency:@cloudflare/workers-utils 0.41.2

  36. 0.9.0

    22 Sep 2026
    • Request every grantable scope registered for the cf OAuth client on login

      The cf OAuth flow now requests all 468 scopes that are both accepted for its production client and grantable by the consent service, allowing cf commands to call the corresponding APIs. Six client-registered scopes without consent mappings remain excluded so browser and device login do not fail during authorization.

  37. 0.8.x
  38. 0.8.0

    22 Sep 2026
    • Include Account Tag Write in the default CF CLI OAuth scopes

      New CF CLI logins now request permission to manage account resource tags. Existing sessions must reauthenticate to receive the additional scope.

  39. 0.7.x
  40. 0.7.1 – 0.7.44 releases that only update dependencies@cloudflare/workers-utils 0.41.0Show each
  41. 0.7.0

    15 Sep 2026
    • Removed

      Remove the gated Web Search binding and Wrangler command

      The unreleased search binding and its experimental command have been removed from Wrangler, Miniflare, and configuration APIs.

    • Accept all production-registered cf OAuth scopes for explicit requests

      The cf scope validator now recognizes the full production OAuth registration, including newer scopes such as dns.read. The existing default login scope request remains unchanged, so broader permissions are requested only when a caller explicitly supplies them.

    • Support per-CLI default OAuth login flows

      CLI descriptors can now make OAuth device authorization their default while preserving a per-login opt-out. The cf auth layer enables this default for both explicit login commands and implicit logins started during account resolution; Wrangler continues to use its localhost callback flow by default.

  42. 0.6.x
  43. 0.6.10 – 0.6.123 releases that only update dependencies@cloudflare/workers-utils 0.38.1Show each
  44. 0.6.9

    7 Sep 2026
    • Fix cf auth login requesting unsupported email read scopes

      The Cloudflare OAuth server does not define email_routing:read or email_sending:read. The cf CLI now requests only the registered write scopes for those products, preventing login from failing with an unknown OAuth scope error.

  45. 0.6.8

    3 Sep 2026
    • Add missing email_routing and email_sending auth scopes to CF cli

  46. 0.6.7

    1 Sep 2026

    Only updates a dependency:@cloudflare/workers-utils 0.35.0

  47. 0.6.6

    25 Aug 2026
    • Fix wrangler login --use-keyring incorrectly reporting that secret-tool is missing on Linux

      Libsecret's secret-tool does not support --version; it prints usage and exits 2, which Wrangler previously interpreted as unavailable. Wrangler now reports it missing only when launching the executable fails.

  48. 0.6.5

    20 Aug 2026
    • Recover from a partially installed keyring backend on Windows

      Choosing to keep your credentials in the OS keyring on Windows installs a native backend the first time you opt in. An install interrupted part-way through — by a dropped connection, a full disk, or an npm told to skip optional packages — could leave a broken backend behind that was nonetheless treated as working. Every login, token refresh, and credential read from then on failed with an internal error, and because the broken state was never re-examined, no amount of retrying would clear it.

      A broken backend is now spotted and reinstalled automatically. If the reinstall still cannot produce a working one, you get a single explanation of how to install it by hand and fall back to the plaintext credentials file for the rest of the session, rather than sitting through a fresh install attempt on every credential access.

    • Fix the --temporary error on commands that authenticate more than one time

      wrangler d1 migrations apply --remote --temporary failed with this error: You're already authenticated with Cloudflare, so --temporary can't be used. The failure occurred with no login and with no CLOUDFLARE_API_TOKEN. This command authenticates one time for each statement that it runs. The first authentication makes a temporary preview account. The second authentication read the token of this new account as an earlier login.

      Wrangler now uses again the temporary account from the same command run. Commands that authenticate more than one time now work as wrangler deploy --temporary works. If real credentials are available, --temporary is still an error.

  49. 0.6.4

    18 Aug 2026
    • Use the current Cloudflare Access service-token credentials after environment variables change. Interactive Access cookie caching is unchanged.

  50. 0.6.1 – 0.6.33 releases that only update dependencies@cloudflare/workers-utils 0.33.0undici 7.29.0Show each
  51. 0.6.0

    5 Aug 2026
    • Add support for OAuth 2.0 Device Authorization Grant to wrangler login

      Run wrangler login --device to authenticate without a local callback server. Useful in containers, remote SSH sessions, Codespaces, and any other environment where localhost:8976 is unreachable from your browser.

      The new flow:

      The verification URL is supplied by the authorization server, so it is rejected unless it is an https URL on the same auth domain the device code was requested from — it is never printed or opened otherwise.

      --callback-host and --callback-port cannot be combined with --device, since this flow does not start a local callback server.

  52. 0.5.x
  53. 0.5.6

    31 Jul 2026
    • Report a clear error for account IDs that can't be used in a Cloudflare API request

      Account IDs are substituted straight into Cloudflare API URL paths, so a value containing non-ASCII characters previously failed deep inside the request layer with an opaque Cannot convert argument to a ByteString error that gave no hint about which setting was at fault. Account IDs read from CLOUDFLARE_ACCOUNT_ID and from the account_id configuration field are now validated up front, and an invalid value fails with a message naming both the offending value and where it came from.

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.