Skip to content
Snippets Groups Projects
Commit 81d24f18 authored by rithu leena john's avatar rithu leena john Committed by GitHub
Browse files

Merge pull request #931 from rithujohn191/local-connector

cmd/dex/serve: add local connector directly to static connectors in storage
parents 951fb053 dc4b97b8
No related branches found
No related tags found
No related merge requests found
...@@ -147,15 +147,6 @@ func serve(cmd *cobra.Command, args []string) error { ...@@ -147,15 +147,6 @@ func serve(cmd *cobra.Command, args []string) error {
s = storage.WithStaticPasswords(s, passwords) s = storage.WithStaticPasswords(s, passwords)
} }
if c.EnablePasswordDB {
c.StaticConnectors = append(c.StaticConnectors, Connector{
ID: server.LocalConnector,
Name: "Email",
Type: server.LocalConnector,
})
logger.Infof("config connector: local passwords enabled")
}
storageConnectors := make([]storage.Connector, len(c.StaticConnectors)) storageConnectors := make([]storage.Connector, len(c.StaticConnectors))
for i, c := range c.StaticConnectors { for i, c := range c.StaticConnectors {
if c.ID == "" || c.Name == "" || c.Type == "" { if c.ID == "" || c.Name == "" || c.Type == "" {
...@@ -174,6 +165,16 @@ func serve(cmd *cobra.Command, args []string) error { ...@@ -174,6 +165,16 @@ func serve(cmd *cobra.Command, args []string) error {
storageConnectors[i] = conn storageConnectors[i] = conn
} }
if c.EnablePasswordDB {
storageConnectors = append(storageConnectors, storage.Connector{
ID: server.LocalConnector,
Name: "Email",
Type: server.LocalConnector,
})
logger.Infof("config connector: local passwords enabled")
}
s = storage.WithStaticConnectors(s, storageConnectors) s = storage.WithStaticConnectors(s, storageConnectors)
if len(c.OAuth2.ResponseTypes) > 0 { if len(c.OAuth2.ResponseTypes) > 0 {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment