diff --git a/fyle_rest_auth/helpers.py b/fyle_rest_auth/helpers.py index be2c966..0271b42 100644 --- a/fyle_rest_auth/helpers.py +++ b/fyle_rest_auth/helpers.py @@ -136,6 +136,13 @@ def validate_refresh_token_and_login(request): employee_info['data']['org']['id'], tokens['refresh_token'] ) + if 'async_update_user_settings_api' in settings.FYLE_REST_AUTH_SETTINGS \ + and settings.FYLE_REST_AUTH_SETTINGS['async_update_user_settings_api']: + async_task( + 'apps.orgs.tasks.async_update_fyle_credentials', + employee_info['data']['org']['id'], tokens['refresh_token'] + ) + return tokens except ValidationError as error: diff --git a/setup.py b/setup.py index 809f7a2..a1f861b 100644 --- a/setup.py +++ b/setup.py @@ -8,7 +8,7 @@ setuptools.setup( name='fyle-rest-auth', - version='1.7.0', + version='1.7.1', author='Shwetabh Kumar', author_email='shwetabh.kumar@fyle.in', description='Django application to implement OAuth 2.0 using Fyle in Django rest framework',