Skip to content

Commit

Permalink
fix(sso): Set redirectURI for gitea, google, oauth Dex connectors (#1…
Browse files Browse the repository at this point in the history
…1237)

Signed-off-by: ylxianzhe <ylxianzhe@outlook.com>
Co-authored-by: Michael Crenshaw <350466+crenshaw-dev@users.noreply.github.com>
  • Loading branch information
xianzheTM and crenshaw-dev authored Jul 26, 2023
1 parent 826a11f commit eced83d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion util/dex/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion util/dex/dex_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
}
Expand Down

0 comments on commit eced83d

Please sign in to comment.