From 6d53f33df06f74aab13a5c7d194809131c6d502f Mon Sep 17 00:00:00 2001 From: Jiaxu Liu Date: Mon, 23 Mar 2026 14:45:33 +0000 Subject: [PATCH] fix: verify Copilot subscription access after gh auth login MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit After a successful gh auth login, call check_copilot_auth() to confirm the new token actually has Copilot access — not just that a token exists. Prevents proceeding with an account that has no Copilot subscription. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- cli/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/utils.py b/cli/utils.py index db275806..0414cb9f 100644 --- a/cli/utils.py +++ b/cli/utils.py @@ -375,11 +375,11 @@ def perform_copilot_oauth() -> bool: console.print("[red]`gh auth login` failed.[/red]") return False - if _get_github_token(): - console.print("[green]✓ GitHub authentication successful![/green]") + if check_copilot_auth(): + console.print("[green]✓ Authenticated with GitHub Copilot[/green]") return True - console.print("[red]Could not retrieve token after login.[/red]") + console.print("[red]Could not retrieve token or verify Copilot access after login.[/red]") return False