From d752121c79f171460df06d01d93c14562d3e9d12 Mon Sep 17 00:00:00 2001 From: iProdigy <8106344+iProdigy@users.noreply.github.com> Date: Sun, 9 Nov 2025 12:24:58 -0600 Subject: [PATCH] fix(token): apply override client id and secret before empty check --- cmd/token.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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"