Fixed an issue where the error is shown on logout when the authentication source is oauth2. Fixes #7059

This commit is contained in:
Yogesh Mahajan 2022-03-15 16:38:54 +05:30 committed by Akshay Joshi
parent dfb66b427c
commit 7b6469bd35
3 changed files with 28 additions and 0 deletions

View File

@ -11,6 +11,7 @@ notes for it.
.. toctree::
:maxdepth: 1
release_notes_6_8
release_notes_6_7
release_notes_6_6
release_notes_6_5

View File

@ -0,0 +1,22 @@
************
Version 6.8
************
Release date: 2022-04-07
This release contains a number of bug fixes and new features since the release of pgAdmin4 6.7.
New features
************
Housekeeping
************
Bug fixes
*********
| `Issue #7059 <https://redmine.postgresql.org/issues/7059>`_ - Fixed an issue where the error is shown on logout when the authentication source is oauth2.

View File

@ -43,6 +43,11 @@ def get_logout_url() -> str:
KERBEROS:
return _URL_WITH_NEXT_PARAM.format(url_for(
'kerberos.logout'), url_for(BROWSER_INDEX))
elif config.SERVER_MODE and\
session['auth_source_manager']['current_source'] == \
OAUTH2:
return _URL_WITH_NEXT_PARAM.format(url_for(
'oauth2.logout'), url_for(BROWSER_INDEX))
return _URL_WITH_NEXT_PARAM.format(
url_for('security.logout'), url_for(BROWSER_INDEX))