Skip to content

GH AUTH LOGIN add a way of predicting Oauth flow redirect port #105

@gbordier

Description

@gbordier

in current entrerprise setup the device code flow and the Personal Access Tokens are being depreciated for security reasons. CyberSec teams prefer the interactive flow that can be better controlled with MFA and so on.

However, most users are using gh from a remote machine with vscode for instance so they would need to initiate port forwarding from their IDE to the actual remote HTTP server that is started by gh auth login before the authentication attempt.

The current implementation chooses a random port in bindLocalServer in https://github.com/cli/oauth/blob/main/webapp/local_server.go .

Being able to use redirect port from the command line or an environment variable would enable developpers to pre-configure port forwarding to achieve interactive logon with Oauth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions