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