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: