Skip to content

Commit

Permalink
fix: make client secret argument optional
Browse files Browse the repository at this point in the history
The client secret is not required in PKCE authentication
mode.
See dexidp/dex#2244 for more info
  • Loading branch information
mougams committed Jun 21, 2024
1 parent c0930a5 commit 56c78a1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions internal/auth/authenticator_oidc.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,12 +271,15 @@ func extractOAuth2Args(msg *message.Message, readClientInfoFromMessages bool) (O
}
}

if clientid == nil || clientsecret == nil || redirecturl == nil {
if clientid == nil || redirecturl == nil {
temp := ""
clientid = &temp
clientsecret = &temp
redirecturl = &temp
}
if clientsecret == nil {
temp := ""
clientsecret = &temp
}
return OAuthArgs{ssl: ssl, host: host, pathq: pathq,
cookie: cookie, clientid: *clientid,
clientsecret: *clientsecret, redirecturl: *redirecturl},
Expand Down

0 comments on commit 56c78a1

Please sign in to comment.