Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Windows keyring error recommends cf auth login --use-keyring, which isn't a valid option

Open
#326 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
Half a day
Newbie friendliness
45/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
nodejs, typescript

Research direction

Start from windowsBindingMissingMessage and secretToolMissingMessage in the shared workers-auth code, which build the cf auth login --use-keyring advice, and from setKeyringPreference, which no command exposes. Reproduce with CLOUDFLARE_AUTH_USE_KEYRING=true and no @napi-rs/keyring installed. Done means the message points only at options cf actually accepts, and that choice is agreed with maintainers first.

Written by the indexing model from the issue text.

Description

Summary of the issue

On Windows, when CLOUDFLARE_AUTH_USE_KEYRING=true is set and @napi-rs/keyring isn't installed, any non-interactive auth command fails with:

Run `cf auth login --use-keyring` interactively to install it automatically, …
Or disable keyring storage: `cf auth login --no-use-keyring`.

cf auth login doesn't define --use-keyring or --useKeyring, so following the advice gives an unknown-argument error. The text comes from windowsBindingMissingMessage(loginCommand) in the shared workers-auth code, and the flag only exists in wrangler. In cf, keyring storage is controlled only by CLOUDFLARE_AUTH_USE_KEYRING or the stored keyring_enabled preference. setKeyringPreference exists, but no command exposes it. secretToolMissingMessage (Linux) has the same problem.

Related:

  • The fallback lookup uses npm root -g, so a global install made through Volta (and probably other version managers) is never found, even though the message suggests npm install -g.
  • defaultNpmRunner uses shell: true only on win32, which triggers Node 26's DEP0190 warning.
Expected behaviour

Suggested fix:

either add --use-keyring/--useKeyring to cf auth login, or pass cf-specific wording, such as setting CLOUDFLARE_AUTH_USE_KEYRING, into these messages.

Version of cf used

v1.0.0-beta.17

System information and package versions

Windows 10
Node 26.1.0
npm: 11.17.0

Reproduction (optional)

Run in PowerShell:

$env:CLOUDFLARE_AUTH_USE_KEYRING="true"; cf auth whoami < NUL
Relevant error logs (optional)

No response

Dominant language
TypeScript
Stars
853
Forks
42
Avg merge
17h 57m
Merged PRs (30d)
146

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from cloudflare/cf

All issues in cloudflare/cf

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.