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

@@ -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))