Skip to content

Commit 78658e9

Browse files
committed
fix authorization_code
1 parent 2a2b5b8 commit 78658e9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@ func (srv *Server) HandleToken(w http.ResponseWriter, r *http.Request) {
323323
} else if grantType == AuthorizationCodeKey {
324324
code := r.PostFormValue(CodeKey)
325325
redirectURIStr := r.PostFormValue(RedirectURIKey)
326-
clientID := r.PostFormValue(ClientIDKey)
326+
if clientID == "" {
327+
clientID = r.PostFormValue(ClientIDKey)
328+
}
327329
if code == "" || redirectURIStr == "" || clientID == "" {
328330
WriterError(w, ErrInvalidRequest)
329331
return

0 commit comments

Comments
 (0)