From 7128825ad1acaf2bee04226769e461e91b61302e Mon Sep 17 00:00:00 2001 From: XianzheTM Date: Wed, 9 Nov 2022 19:38:58 +0800 Subject: [PATCH] fix: Set redirectURI for gitea, google, oauth Dex connectors Signed-off-by: ylxianzhe --- 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 5d569713c4e2a..7141229429a7b 100644 --- a/util/dex/config.go +++ b/util/dex/config.go @@ -151,7 +151,7 @@ func replaceListSecrets(obj []interface{}, secretValues map[string]string) []int // 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 ef4d5305a723b..c49b4e8538a97 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)) }