cli / cli/oauth

`gh auth login`: add a way of predicting Oauth flow redirect port

Open
#105 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
533
Forks
90
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.