Skip to content

feat: rp login prompts for the api key instead of polling - #675

Merged
marie-karpinska merged 1 commit into
mainfrom
mariekarpinska/sls-626-login-paste
Nov 2, 2026
Merged

marie-karpinska merged 1 commit into
mainfrom
mariekarpinska/sls-626-login-paste

Conversation

@marie-karpinska

Copy link
Copy Markdown
Contributor

rp login now reads the API key from the user. After browser approval, the console shows the key and rp login asks for it with a hidden prompt, verifies it with myself, and saves it. --api-key and --profile work as before.

Note for reviewers

  • verify_api_key treats any QueryError as a rejected key, so a server-side GraphQL failure shows as "api key was rejected". Should we split those?

How I tested

  • make test-coverage passes (1540 tests, coverage 91.99%)
  • uv run pytest tests/test_apps/test_auth.py tests/test_apps/test_api_client.py tests/test_cli/test_management_commands.py passes (122 tests), including a check that the pasted key does not appear in CLI output
  • uvx black --check on the changed files reports only formatting that is also flagged on origin/main
  • echo "" | uv run rp login --no-open exits 1 with the interactive-terminal message

rp login creates the auth request and opens the approval url as before, then reads the key from a hidden prompt, checks it with a myself query, and saves it. Up to three attempts; non-TTY stdin fails fast and points to RUNPOD_API_KEY or --api-key.
@marie-karpinska
marie-karpinska force-pushed the mariekarpinska/sls-626-login-paste branch from 9de6167 to f23403f Compare November 2, 2026 22:52
@marie-karpinska
marie-karpinska merged commit 2217b6d into main Nov 2, 2026
9 checks passed
@marie-karpinska
marie-karpinska deleted the mariekarpinska/sls-626-login-paste branch November 2, 2026 23:55
@promptless

promptless Bot commented Nov 2, 2026

Copy link
Copy Markdown

Promptless documentation updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants