Browse Source

allow no secret for static public clients

For statically-configured public clients it should be allowed for both
Secret and SecretEnv fields to be empty.
pull/1701/head
Tomasz Kleczek 6 years ago committed by Tomasz Kleczek
parent
commit
c830d49884
  1. 2
      cmd/dex/serve.go

2
cmd/dex/serve.go

@ -166,7 +166,7 @@ func serve(cmd *cobra.Command, args []string) error {
}
c.StaticClients[i].ID = os.Getenv(client.IDEnv)
}
if client.Secret == "" && client.SecretEnv == "" {
if client.Secret == "" && client.SecretEnv == "" && !client.Public {
return fmt.Errorf("invalid config: Secret or SecretEnv field is required for client %q", client.ID)
}
if client.SecretEnv != "" {

Loading…
Cancel
Save