This is an automated email from the ASF dual-hosted git repository.

lahirujayathilake pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-django-portal.git

commit a723111d1032402d5f9f479da926df3eeac109da
Author: lahiruj <[email protected]>
AuthorDate: Tue Sep 17 00:29:43 2024 -0400

    included email profile scopes for token renewal and removed redirect url 
from the logout request
---
 django_airavata/apps/auth/backends.py | 2 +-
 django_airavata/apps/auth/views.py    | 5 +----
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/django_airavata/apps/auth/backends.py 
b/django_airavata/apps/auth/backends.py
index e882c8e4..bd8292a0 100644
--- a/django_airavata/apps/auth/backends.py
+++ b/django_airavata/apps/auth/backends.py
@@ -160,7 +160,7 @@ class KeycloakBackend(object):
         token_url = settings.KEYCLOAK_TOKEN_URL
         userinfo_url = settings.KEYCLOAK_USERINFO_URL
         verify_ssl = settings.KEYCLOAK_VERIFY_SSL
-        oauth2_session = OAuth2Session(client_id, scope='openid')
+        oauth2_session = OAuth2Session(client_id, scope='openid profile email')
         verify = verify_ssl
         if verify_ssl and hasattr(settings, 'KEYCLOAK_CA_CERTFILE'):
             verify = settings.KEYCLOAK_CA_CERTFILE
diff --git a/django_airavata/apps/auth/views.py 
b/django_airavata/apps/auth/views.py
index 02f0c86e..a05b2480 100644
--- a/django_airavata/apps/auth/views.py
+++ b/django_airavata/apps/auth/views.py
@@ -145,10 +145,7 @@ def handle_login(request):
 
 def start_logout(request):
     logout(request)
-    redirect_url = request.build_absolute_uri(
-        resolve_url(settings.LOGOUT_REDIRECT_URL))
-    return redirect(settings.KEYCLOAK_LOGOUT_URL +
-                    "?redirect_uri=" + quote(redirect_url))
+    return redirect(settings.KEYCLOAK_LOGOUT_URL)
 
 
 def callback(request):

Reply via email to