mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-20 11:29:25 +02:00
handle logout when no session is present
This commit is contained in:
parent
7ec4b32f88
commit
3387ec032b
2 changed files with 25 additions and 1 deletions
|
@ -145,8 +145,12 @@ def logout(request, next_page=None):
|
|||
user = request.user
|
||||
request_args = {
|
||||
"client_id": CLIENT.client_id,
|
||||
"state": request.session["state"],
|
||||
}
|
||||
# if state is not in request session, still redirect to the identity
|
||||
# provider's logout url, but don't include the state in the url; this
|
||||
# will successfully log out of the identity provider
|
||||
if "state" in request.session:
|
||||
request_args["state"] = request.session["state"]
|
||||
if (
|
||||
"post_logout_redirect_uris" in CLIENT.registration_response.keys()
|
||||
and len(CLIENT.registration_response["post_logout_redirect_uris"]) > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue