Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 BUG: Wrangler attempts to login when using --local if previously logged in #6842

Open
Codex- opened this issue Sep 27, 2024 · 0 comments
Labels
bug Something that isn't working

Comments

@Codex-
Copy link

Codex- commented Sep 27, 2024

Which Cloudflare product(s) does this pertain to?

KV, Wrangler, Miniflare

What version(s) of the tool(s) are you using?

3.78.10 [wrangler]

What version of Node are you using?

20.17.0

What operating system and version are you using?

Mac Sequoia 15.0 (24A335)

Describe the Bug

Observed behaviour

If you have previously performed a wrangler login and then attempt to use a command that supports --local and your session has expired, wrangler opens a browser to re-auth before attempting to execute the command.

pnpm exec wrangler kv key put "test-token" "1" --namespace-id wrangler-local-id  --local

Expected behaviour

Usage of --local does not invoke a re-auth

Steps to reproduce

I was able to reproduce this on an older macos system, and on a windows 11 system (with both powershell, and debian wsl).

  • Perform a wrangler login
  • Wait for expiry
  • Attempt to use a command that invokes --local
    • pnpm exec wrangler kv key put "test-token" "1" --namespace-id wrangler-local-id --local
  • Should not attempt a re-auth that

Workaround

  • Perform a wrangler logout and ignore the opened browser window
  • After this, usage of --local works as expected

Please provide a link to a minimal reproduction

No response

Please provide any relevant error logs

No response

@Codex- Codex- added the bug Something that isn't working label Sep 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something that isn't working
Projects
None yet
Development

No branches or pull requests

1 participant