diff --git a/cmd/token.go b/cmd/token.go index f5b0b17..3d7d052 100644 --- a/cmd/token.go +++ b/cmd/token.go @@ -56,6 +56,14 @@ func loginCmdRun(cmd *cobra.Command, args []string) error { clientID = viper.GetString("clientId") clientSecret = viper.GetString("clientSecret") + if overrideClientId != "" { + clientID = overrideClientId + } + + if overrideClientSecret != "" { + clientSecret = overrideClientSecret + } + webserverPort := strconv.Itoa(tokenServerPort) redirectURL := fmt.Sprintf("http://%v:%v", redirectHost, webserverPort) @@ -70,14 +78,6 @@ func loginCmdRun(cmd *cobra.Command, args []string) error { clientSecret = viper.GetString("clientSecret") } - if overrideClientId != "" { - clientID = overrideClientId - } - - if overrideClientSecret != "" { - clientSecret = overrideClientSecret - } - forceVerifyWord := "false" if forceVerify { forceVerifyWord = "true"