Allow public clients created with API to have no client_secret (#1871)
Signed-off-by: Steffen Pøhner Henriksen <str3sses@gmail.com>
This commit is contained in:
parent
86ea49173c
commit
0f68fadb9a
@ -50,7 +50,7 @@ func (d dexAPI) CreateClient(ctx context.Context, req *api.CreateClientReq) (*ap
|
||||
if req.Client.Id == "" {
|
||||
req.Client.Id = storage.NewID()
|
||||
}
|
||||
if req.Client.Secret == "" {
|
||||
if req.Client.Secret == "" && !req.Client.Public {
|
||||
req.Client.Secret = storage.NewID() + storage.NewID()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user