Skip to content

Commit

Permalink
fix: make token user command work with public clients (#2479)
Browse files Browse the repository at this point in the history
  • Loading branch information
svrakitin authored Apr 22, 2021
1 parent d8682a9 commit a033d6a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/token_user.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,12 +115,12 @@ and success, unless if the --no-shutdown flag is provided.`,
noShutdown := flagx.MustGetBool(cmd, "no-shutdown")

clientID := flagx.MustGetString(cmd, "client-id")
clientSecret := flagx.MustGetString(cmd, "client-secret")
if clientID == "" || clientSecret == "" {
if clientID == "" {
fmt.Print(cmd.UsageString())
fmt.Println("Please provide a Client ID and Client Secret using flags --client-id and --client-secret, or environment variables OAUTH2_CLIENT_ID and OAUTH2_CLIENT_SECRET.")
fmt.Println("Please provide a Client ID using --client-id flag, or OAUTH2_CLIENT_ID environment variable.")
return
}
clientSecret := flagx.MustGetString(cmd, "client-secret")

proto := "http"
if isSSL {
Expand Down

0 comments on commit a033d6a

Please sign in to comment.