Skip to content

Commit

Permalink
Allow public clients created with API to have no client_secret (#1871)
Browse files Browse the repository at this point in the history
Signed-off-by: Steffen Pøhner Henriksen <str3sses@gmail.com>
  • Loading branch information
spohner committed Feb 19, 2021
1 parent 86ea491 commit 0f68fad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}

Expand Down

0 comments on commit 0f68fad

Please sign in to comment.