Desimone/authenticate default logout (#1390)

* authenticate: fix unset post_logout_redirect_uri
* don't show url if does not exist
Signed-off-by: Bobby DeSimone <bobbydesimone@gmail.com>
This commit is contained in:
bobby 2020-09-09 11:53:12 -07:00 committed by GitHub
parent 1fcd86120b
commit 05d9fbb4b3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 3 deletions

View file

@ -290,7 +290,7 @@ func (a *Authenticate) SignOut(w http.ResponseWriter, r *http.Request) error {
}
endSessionURL, err := a.provider.Load().LogOut()
if err == nil {
if err == nil && redirectString != "" {
params := url.Values{}
params.Add("post_logout_redirect_uri", redirectString)
endSessionURL.RawQuery = params.Encode()