fix(op): omit empty state from code flow redirect (#428)
* chore(op): reproduce issue #415 * fix(op): omit empty state from code flow redirect Add test cases to reproduce the original bug, and it's resolution. closes #415
This commit is contained in:
parent
45582b6ee9
commit
37b5de0e82
2 changed files with 134 additions and 5 deletions
|
@ -448,11 +448,11 @@ func AuthResponseCode(w http.ResponseWriter, r *http.Request, authReq AuthReques
|
|||
return
|
||||
}
|
||||
codeResponse := struct {
|
||||
code string
|
||||
state string
|
||||
Code string `schema:"code"`
|
||||
State string `schema:"state,omitempty"`
|
||||
}{
|
||||
code: code,
|
||||
state: authReq.GetState(),
|
||||
Code: code,
|
||||
State: authReq.GetState(),
|
||||
}
|
||||
callback, err := AuthResponseURL(authReq.GetRedirectURI(), authReq.GetResponseType(), authReq.GetResponseMode(), &codeResponse, authorizer.Encoder())
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue