diff --git a/pkg/shared/hacks/temp.go b/pkg/shared/hacks/temp.go index ffe00e5ed..d49992343 100644 --- a/pkg/shared/hacks/temp.go +++ b/pkg/shared/hacks/temp.go @@ -9,6 +9,7 @@ import ( "fmt" "io" "net/http" + "os" "github.com/redhat-developer/app-services-cli/pkg/core/logging" kafkamgmtclient "github.com/redhat-developer/app-services-sdk-go/kafkamgmt/apiv1/client" @@ -17,7 +18,13 @@ import ( // Temporary hack that we use to determine if // Our CLI needs to use mas-sso token func ShouldUseMasSSO(logger logging.Logger, apiUrl string) bool { - req, err := http.NewRequest("GET", apiUrl+"/api/kafkas_mgmt/v1/sso_providers", nil) + finalUrl := apiUrl + "/api/kafkas_mgmt/v1/sso_providers" + externalUrl := os.Getenv("RHOAS_CUSTOM_SSO_PROVIDER_URL") + if externalUrl != "" { + finalUrl = externalUrl + } + + req, err := http.NewRequest("GET", finalUrl, nil) if err != nil { logger.Debug("Error when fetching auth config", err) return true