Skip to content

Commit d7815ab

Browse files
authored
Merge pull request #359 from iProdigy/patch-1
fix(token): apply override client id and secret before empty check
2 parents f52a6e2 + d752121 commit d7815ab

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

cmd/token.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,14 @@ func loginCmdRun(cmd *cobra.Command, args []string) error {
5656
clientID = viper.GetString("clientId")
5757
clientSecret = viper.GetString("clientSecret")
5858

59+
if overrideClientId != "" {
60+
clientID = overrideClientId
61+
}
62+
63+
if overrideClientSecret != "" {
64+
clientSecret = overrideClientSecret
65+
}
66+
5967
webserverPort := strconv.Itoa(tokenServerPort)
6068
redirectURL := fmt.Sprintf("http://%v:%v", redirectHost, webserverPort)
6169

@@ -70,14 +78,6 @@ func loginCmdRun(cmd *cobra.Command, args []string) error {
7078
clientSecret = viper.GetString("clientSecret")
7179
}
7280

73-
if overrideClientId != "" {
74-
clientID = overrideClientId
75-
}
76-
77-
if overrideClientSecret != "" {
78-
clientSecret = overrideClientSecret
79-
}
80-
8181
forceVerifyWord := "false"
8282
if forceVerify {
8383
forceVerifyWord = "true"

0 commit comments

Comments
 (0)