Skip to content

🐛 Handle declined OAuth device authorization - #375

Merged
patrick91 merged 1 commit into
mainfrom
fix/oauth-declined
Nov 5, 2026
Merged

patrick91 merged 1 commit into
mainfrom
fix/oauth-declined

Conversation

@patrick91

Copy link
Copy Markdown
Member

Summary

  • Handle OAuth device-flow access_denied explicitly instead of reporting a generic HTTP 400/server error.
  • Show a clear authorization-declined message and guidance to start a new login and approve the request.
  • Return the standard permission_denied error envelope for JSON output, without writing an auth config or continuing to poll after denial.
  • Preserve generic HTTP error handling for unknown OAuth errors.

Fixes #66

Tests

  • uv run pytest -q — 810 passed.
  • uv run bash scripts/lint.sh — mypy, ty, Ruff lint and formatting passed.
  • Clean coverage run for login/deploy tests — 108 passed; 100% coverage for src/fastapi_cloud_cli/commands/_flow.py and tests/test_cli_login.py.
  • Human-output snapshots cover all login aliases and auth wait; JSON tests cover immediate denial and denial after authorization_pending.

@patrick91 patrick91 added the bug Something isn't working label Nov 5, 2026
@patrick91
patrick91 merged commit 5b832f3 into main Nov 5, 2026
20 checks passed
@patrick91
patrick91 deleted the fix/oauth-declined branch November 5, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Handle oauth declined errors

1 participant