From 3d73b03e94a9f47fab7fa7c76cb46531cc0cb177 Mon Sep 17 00:00:00 2001 From: ashwin1111 Date: Wed, 16 Oct 2024 14:57:35 +0530 Subject: [PATCH 1/2] feat: Add few more loggers for debugging --- fyle_rest_auth/authentication.py | 3 ++- setup.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fyle_rest_auth/authentication.py b/fyle_rest_auth/authentication.py index e08504e..e9c59a8 100644 --- a/fyle_rest_auth/authentication.py +++ b/fyle_rest_auth/authentication.py @@ -75,12 +75,13 @@ def validate_token(access_token_string: str, origin_address: str) -> Dict: email = cache.get(email_unique_key) user = cache.get(user_unique_key) - logger.info('email, user unique key, email unique key %s, %s, %s', email, user_unique_key, email_unique_key) + logger.info('email, user unique key, email unique key user %s, %s, %s, %s', email, user_unique_key, email_unique_key, user) if not (email and user): cache.delete_many([email_unique_key, user_unique_key]) try: employee_info = get_fyle_admin(access_token_string.split(' ')[1], origin_address) + logger.info('employee_info %s', employee_info) except Exception: raise AuthenticationFailed('Invalid access token') diff --git a/setup.py b/setup.py index dbed80e..2822b88 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='fyle-rest-auth', - version='1.7.3', + version='1.7.4', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Django application to implement OAuth 2.0 using Fyle in Django rest framework', From bd622c3b7b90422b982c31764c0b453279984f48 Mon Sep 17 00:00:00 2001 From: ashwin1111 Date: Wed, 16 Oct 2024 14:59:09 +0530 Subject: [PATCH 2/2] feat: Add few more loggers for debugging --- fyle_rest_auth/authentication.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/fyle_rest_auth/authentication.py b/fyle_rest_auth/authentication.py index e9c59a8..ec55d11 100644 --- a/fyle_rest_auth/authentication.py +++ b/fyle_rest_auth/authentication.py @@ -75,7 +75,10 @@ def validate_token(access_token_string: str, origin_address: str) -> Dict: email = cache.get(email_unique_key) user = cache.get(user_unique_key) - logger.info('email, user unique key, email unique key user %s, %s, %s, %s', email, user_unique_key, email_unique_key, user) + logger.info( + 'email, user unique key, email unique key user %s, %s, %s, %s', + email, user_unique_key, email_unique_key, user + ) if not (email and user): cache.delete_many([email_unique_key, user_unique_key])