diff --git a/cmd/other/login.go b/cmd/other/login.go index 970680b..0d9e2ac 100644 --- a/cmd/other/login.go +++ b/cmd/other/login.go @@ -451,10 +451,7 @@ func executeUserLogin(currentEnv string) { } accessToken, refreshToken, newAccessToken, err := getValidTokens(currentEnv) - if err == nil && refreshToken != "" && !isTokenExpired(refreshToken) { - // Use existing valid refresh token - accessToken = newAccessToken - } else { + if err != nil || refreshToken == "" || isTokenExpired(refreshToken) { // Get new tokens with password password := promptPassword() accessToken, refreshToken, err = issueToken(baseUrl, tempUserID, password, domainID)