diff --git a/cmd/ocm/login/cmd.go b/cmd/ocm/login/cmd.go index 4b07712c..0511825c 100644 --- a/cmd/ocm/login/cmd.go +++ b/cmd/ocm/login/cmd.go @@ -150,7 +150,9 @@ func init() { &args.useAuthCode, "use-auth-code", false, - "Enables login using OAuth2, Redirects user to Red Hat SSO.", + "Enables OAuth Authorization Code login using PKCE. If this option is provided, "+ + "the user will be taken to Red Hat SSO for authentication. In order to use a different account"+ + "log out from sso.redhat.com after using the 'ocm logout' command.", ) flags.MarkHidden("use-auth-code") } @@ -167,7 +169,7 @@ func run(cmd *cobra.Command, argv []string) error { fmt.Println("You will now be redirected to Red Hat SSO login") token, err := authentication.VerifyLogin(oauthClientID) if err != nil { - return err + return fmt.Errorf("An error occurred while retrieving the token : %v", err) } args.token = token fmt.Println("Token received successfully")