mirror of
https://github.com/oauth2-proxy/oauth2-proxy.git
synced 2026-09-30 03:31:27 +02:00
* Fix backend logout URL call on sign out (#3172) Signed-off-by: Vivek Sejpal <vsejpal@gmail.com> * doc: changelog entry for #3352 Signed-off-by: Jan Larwig <jan@larwig.com> --------- Signed-off-by: Vivek Sejpal <vsejpal@gmail.com> Signed-off-by: Jan Larwig <jan@larwig.com> Co-authored-by: Jan Larwig <jan@larwig.com>
This commit is contained in:
co-authored by
Jan Larwig
parent
88075737a6
commit
75ff537915
+4
-2
@@ -746,6 +746,10 @@ func (p *OAuthProxy) SignOut(rw http.ResponseWriter, req *http.Request) {
|
||||
p.ErrorPage(rw, req, http.StatusInternalServerError, err.Error())
|
||||
return
|
||||
}
|
||||
// Call backend logout before clearing the session so we still have the session
|
||||
// (and id_token) available to invoke the provider's logout endpoint
|
||||
p.backendLogout(rw, req)
|
||||
|
||||
err = p.ClearSessionCookie(rw, req)
|
||||
if err != nil {
|
||||
logger.Errorf("Error clearing session cookie: %v", err)
|
||||
@@ -753,8 +757,6 @@ func (p *OAuthProxy) SignOut(rw http.ResponseWriter, req *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
p.backendLogout(rw, req)
|
||||
|
||||
http.Redirect(rw, req, redirect, http.StatusFound)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user