From 0ba9d2c775050707aebbce5db4f17119d0967205 Mon Sep 17 00:00:00 2001 From: Ivan Nikolskiy Date: Thu, 14 Aug 2025 12:36:10 +0100 Subject: [PATCH] New features --- django_hopid/auth.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/django_hopid/auth.py b/django_hopid/auth.py index 29aa14e..916b401 100644 --- a/django_hopid/auth.py +++ b/django_hopid/auth.py @@ -27,12 +27,14 @@ class HopIDAuthentication(BaseAuthentication): try: claims = verify_jwt_token(access_token) user = get_user_from_jwt_claims(claims, access_token) - except Exception: + except Exception as e: + print(e) user = None # Try refreshing session-based tokens if not user and is_session_based and refresh_token: tokens = refresh_access_token(refresh_token) + print(tokens) if tokens: access_token = tokens.get('access_token') refresh_token = tokens.get('refresh_token') @@ -43,7 +45,8 @@ class HopIDAuthentication(BaseAuthentication): try: claims = verify_jwt_token(access_token) user = get_user_from_jwt_claims(claims, access_token) - except Exception: + except Exception as e: + print(e) user = None if not user: