Skip to content

Commit

Permalink
Fixed the error occurring during logout from pgadmin when using OAuth…
Browse files Browse the repository at this point in the history
…2 authnecation with query tool open.pgadmin-org#8299
  • Loading branch information
yogeshmahajan-1903 committed Jan 20, 2025
1 parent df533fe commit 98fd8db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion web/pgadmin/authenticate/oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ def oauth_logout():

if not current_user.is_authenticated:
return redirect(get_safe_post_logout_redirect())

# Logout the user firs to avoid crypt key issue while
# cancelling existing query tool transactions
logout_user()
for key in list(session.keys()):
session.pop(key)

logout_user()
if logout_url:
return redirect(logout_url.format(
redirect_uri=request.url_root,
Expand Down

0 comments on commit 98fd8db

Please sign in to comment.