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:
Tim Möhlmann 2023-08-18 15:18:04 +03:00
parent dcbc40093d
commit 11fef51e2d
2 changed files with 6 additions and 6 deletions

View file

@ -1026,7 +1026,7 @@ func TestAuthResponseCode(t *testing.T) {
},
res: res{
wantCode: http.StatusFound,
wantLocationHeader: "/auth/callback/?code=id1&state=",
wantLocationHeader: "/auth/callback/?code=id1&state=state1",
wantBody: "",
},
},
@ -1051,7 +1051,7 @@ func TestAuthResponseCode(t *testing.T) {
},
res: res{
wantCode: http.StatusFound,
wantLocationHeader: "/auth/callback/?code=id1&state=state1",
wantLocationHeader: "/auth/callback/?code=id1",
wantBody: "",
},
},