Skip to content

Commit 06c3b60

Browse files
author
Arran Ubels
authored
Not all cases require client_secret
It's likely that there might have be 2 of these functions or a switch involved
1 parent 250eb27 commit 06c3b60

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/handler.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ type (
4646
// ClientFormHandler get client data from form
4747
func ClientFormHandler(r *http.Request) (string, string, error) {
4848
clientID := r.Form.Get("client_id")
49-
clientSecret := r.Form.Get("client_secret")
50-
if clientID == "" || clientSecret == "" {
49+
if clientID == "" {
5150
return "", "", errors.ErrInvalidClient
5251
}
52+
clientSecret := r.Form.Get("client_secret")
5353
return clientID, clientSecret, nil
5454
}
5555

0 commit comments

Comments
 (0)