diff --git a/pkg/cmd/auth/auth.go b/pkg/cmd/auth/auth.go index 7f2520631..67c6abb31 100644 --- a/pkg/cmd/auth/auth.go +++ b/pkg/cmd/auth/auth.go @@ -3,6 +3,7 @@ package auth import ( authLoginCmd "github.com/cli/cli/pkg/cmd/auth/login" authLogoutCmd "github.com/cli/cli/pkg/cmd/auth/logout" + authRefreshCmd "github.com/cli/cli/pkg/cmd/auth/refresh" authStatusCmd "github.com/cli/cli/pkg/cmd/auth/status" "github.com/cli/cli/pkg/cmdutil" "github.com/spf13/cobra" @@ -18,6 +19,7 @@ func NewCmdAuth(f *cmdutil.Factory) *cobra.Command { cmd.AddCommand(authLoginCmd.NewCmdLogin(f, nil)) cmd.AddCommand(authLogoutCmd.NewCmdLogout(f, nil)) cmd.AddCommand(authStatusCmd.NewCmdStatus(f, nil)) + cmd.AddCommand(authRefreshCmd.NewCmdRefresh(f, nil)) return cmd } diff --git a/pkg/cmd/factory/http.go b/pkg/cmd/factory/http.go index 8a6dab198..b113100f7 100644 --- a/pkg/cmd/factory/http.go +++ b/pkg/cmd/factory/http.go @@ -35,7 +35,7 @@ func httpClient(io *iostreams.IOStreams, cfg config.Config, appVersion string, s // TODO: check if stdout is TTY too if errors.As(err, ¬Found) && io.IsStdinTTY() { // interactive OAuth flow - token, err = config.AuthFlowWithConfig(cfg, hostname, "Notice: authentication required") + token, err = config.AuthFlowWithConfig(cfg, hostname, "Notice: authentication required", nil) } if err != nil { return "", err