Skip to content

Respect the SSO challenge as received from the API when using a PAT #5002

@mislav

Description

@mislav

When a Personal Access Token is used with GitHub CLI for authentication, the token might not be authorized to resources in a specific organization. In that case, the API will present a challenge via response headers:

X-GitHub-SSO: required; url=<URL>

GitHub CLI should parse this response header and present an option to the user to follow the authorization URL in their browser.

Followup to #4241
Re: SAML enforcement

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinghelp wantedContributions welcomepriority-3Affects a small number of users or is largely cosmetic

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions