From eced83da8398d78cf21b4cdd17c78959d71bd2eb Mon Sep 17 00:00:00 2001 From: XianzheTM Date: Wed, 26 Jul 2023 21:07:36 +0000 Subject: [PATCH] fix(sso): Set redirectURI for gitea, google, oauth Dex connectors (#11237) Signed-off-by: ylxianzhe Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com> --- util/dex/config.go | 2 +- util/dex/dex_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/util/dex/config.go b/util/dex/config.go index 6f09eb2c46080..44d853674b19b 100644 --- a/util/dex/config.go +++ b/util/dex/config.go @@ -115,7 +115,7 @@ func GenerateDexConfigYAML(argocdSettings *settings.ArgoCDSettings, disableTls b // https://dexidp.io/docs/connectors/ func needsRedirectURI(connectorType string) bool { switch connectorType { - case "oidc", "saml", "microsoft", "linkedin", "gitlab", "github", "bitbucket-cloud", "openshift": + case "oidc", "saml", "microsoft", "linkedin", "gitlab", "github", "bitbucket-cloud", "openshift", "gitea", "google", "oauth": return true } return false diff --git a/util/dex/dex_test.go b/util/dex/dex_test.go index ed7dc6bc6e45c..a993db3375cb7 100644 --- a/util/dex/dex_test.go +++ b/util/dex/dex_test.go @@ -270,7 +270,7 @@ func Test_GenerateDexConfig(t *testing.T) { }) t.Run("Redirect config", func(t *testing.T) { - types := []string{"oidc", "saml", "microsoft", "linkedin", "gitlab", "github", "bitbucket-cloud"} + types := []string{"oidc", "saml", "microsoft", "linkedin", "gitlab", "github", "bitbucket-cloud", "openshift", "gitea", "google", "oauth"} for _, c := range types { assert.True(t, needsRedirectURI(c)) }