Rejected token with `--no-interactive` still opens the browser login prompt
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 70/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- cli, python
- Domain
- authentication, cli
Research direction
Look at the reflex-hosting-cli package, specifically the authentication flow for the reflex cloud commands. Start by examining the code that handles the --no-interactive flag and token validation, likely in a file like cli/auth.py or cli/cloud.py. Compare the whoami command's token handling with apps list. Write a test to ensure a rejected token with --no-interactive fails immediately without opening the browser.
Written by the indexing model from the issue text.
Description
Package: reflex-hosting-cli (reproduced on main at ea035ea47 and on #7207 at 988718e78)
When REFLEX_ACCESS_TOKEN holds an invalid token, a command run with --no-interactive starts the browser login flow and waits for Enter:
$ REFLEX_ACCESS_TOKEN=bogus-token reflex cloud apps list --no-interactive
... https://build.reflex.dev/cli/login?request_id=... to authenticate.
please hit 'Enter' or 'Return' after login on website complete:
On main it then prints Unable to list deployments; on #7207 it prints Aborted!. Both exit 1, but only after the prompt, which hangs CI when stdin is a TTY or stays open.
whoami already does the right thing with the same token:
$ REFLEX_ACCESS_TOKEN=bogus-token reflex cloud whoami
The access token from the REFLEX_ACCESS_TOKEN environment variable was rejected: access denied (...)
[exit=1]
Without any token, --no-interactive also fails fast (Token is required for non-interactive mode.).
Expected: with --no-interactive, a rejected token fails immediately, with the same message whoami gives. The interactive login is never offered.
- Dominant language
- Python
- Stars
- 28.9k
- Forks
- 1.8k
- Avg merge
- 1d 15h
- Merged PRs (30d)
- 180
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from reflex-dev/reflex
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
reflex-dev/reflex#7300 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
reflex-dev/reflex#7297 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
reflex-dev/reflex#7296 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
reflex-dev/reflex#7295 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
reflex-dev/reflex#7294 · 1 comment ·
All issues in reflex-dev/reflex
Similar issues
-
agent-ready documentation needs-triage
Difficulty 1/5 1-3 hours Newbie friendliness 88/100
-
documentation
Difficulty 1/5 Under an hour Newbie friendliness 91/100
-
workflow-status page template still says reusable workflows are "triggered only by workflow_call:" Open
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
instance instance add
Difficulty 1/5 Under an hour Newbie friendliness 72/100
searxng/searx-instances#939 · 1 comment ·
-
area-deployment area-integrations triage:bot-seen
Difficulty 2/5 Half a day Newbie friendliness 86/100