From 7b6469bd35ac7a15eb4708a37e469c576bf4ef77 Mon Sep 17 00:00:00 2001 From: Yogesh Mahajan Date: Tue, 15 Mar 2022 16:38:54 +0530 Subject: [PATCH] Fixed an issue where the error is shown on logout when the authentication source is oauth2. Fixes #7059 --- docs/en_US/release_notes.rst | 1 + docs/en_US/release_notes_6_8.rst | 22 ++++++++++++++++++++++ web/pgadmin/authenticate/__init__.py | 5 +++++ 3 files changed, 28 insertions(+) create mode 100644 docs/en_US/release_notes_6_8.rst diff --git a/docs/en_US/release_notes.rst b/docs/en_US/release_notes.rst index 4e03baff0..16f0fc519 100644 --- a/docs/en_US/release_notes.rst +++ b/docs/en_US/release_notes.rst @@ -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 diff --git a/docs/en_US/release_notes_6_8.rst b/docs/en_US/release_notes_6_8.rst new file mode 100644 index 000000000..cdf7cbfd4 --- /dev/null +++ b/docs/en_US/release_notes_6_8.rst @@ -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 `_ - Fixed an issue where the error is shown on logout when the authentication source is oauth2. diff --git a/web/pgadmin/authenticate/__init__.py b/web/pgadmin/authenticate/__init__.py index c62fbe22b..d637e32dd 100644 --- a/web/pgadmin/authenticate/__init__.py +++ b/web/pgadmin/authenticate/__init__.py @@ -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))