Skip to content

Commit badebeb

Browse files
committed
Use device flow as the default OAuth flow for login
The device flow is more likely to succeed than the code flow because it doesn't require the CLI and the authorization server to agree on a redirect URI. Additionally, the device flow doesn't require the CLI to bring up an HTTP server to receive the authorization code, which can also fail in certain environments. Users can still explicitly request the code flow with `--oauth-flow=code` if desired. Signed-off-by: Juan Hernandez <[email protected]>
1 parent 940c05f commit badebeb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

internal/cmd/login/login_cmd.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ func Cmd() *cobra.Command {
107107
flags.StringVar(
108108
&runner.args.oauthFlow,
109109
"oauth-flow",
110-
string(oauth.CodeFlow),
110+
string(oauth.DeviceFlow),
111111
fmt.Sprintf(
112112
"OAuth flow to use. Must be '%s', '%s' or '%s'.",
113113
oauth.CodeFlow, oauth.DeviceFlow, oauth.CredentialsFlow,

0 commit comments

Comments
 (0)