fix: verify Copilot subscription access after gh auth login
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>
This commit is contained in:
parent
fcca3236e9
commit
6d53f33df0
|
|
@ -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
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue