Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes the refresh token process #47

Merged
merged 1 commit into from
Apr 1, 2024
Merged

Fixes the refresh token process #47

merged 1 commit into from
Apr 1, 2024

Conversation

cjaliaga
Copy link
Owner

@cjaliaga cjaliaga commented Apr 1, 2024

This pull request includes changes to the aioaquarea module to improve the authentication process and code readability. The most important changes include the addition of a new constant AQUAREA_SERVICE_AUTH0_CLIENT, refactoring of the request method, introduction of private methods to handle token validation and login process, and the use of the new constant in the async def _login_production(self) -> None: method.

Here are the key changes:

Changes to constants:

  • aioaquarea/const.py: Added a new constant AQUAREA_SERVICE_AUTH0_CLIENT to store the Auth0 client details.

Refactoring of the request method:

  • aioaquarea/core.py: Refactored the request method to use a new private method __contains_valid_token to check if the data contains a valid token. [1] [2]

Introduction of private methods:

  • aioaquarea/core.py: Introduced new private methods __login_demo, __login_production, __complete_login, and __is_final_step to handle the login process and check the final step of the login process. [1] [2] [3] [4]

Changes to the async def _login_production(self) -> None: method:

  • aioaquarea/core.py: Updated the async def _login_production(self) -> None: method to use the new constant AQUAREA_SERVICE_AUTH0_CLIENT and the newly introduced private methods.

@cjaliaga cjaliaga merged commit 0d394b5 into main Apr 1, 2024
@cjaliaga cjaliaga deleted the fix-refresh-token branch April 1, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant