From e2f51d09da75da530b383941a4fb85819e7d5db4 Mon Sep 17 00:00:00 2001 From: icecheng Date: Tue, 12 Aug 2025 11:17:52 +0800 Subject: [PATCH] feat(role): update docs --- apps/authentication/backend/business/signin_manager.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/authentication/backend/business/signin_manager.py b/apps/authentication/backend/business/signin_manager.py index 08faf16..fb6adbb 100644 --- a/apps/authentication/backend/business/signin_manager.py +++ b/apps/authentication/backend/business/signin_manager.py @@ -45,7 +45,7 @@ class SignInManager: Args: email (str): email address code (str): auth code to be verified - host (str): the host address by which the client access the frontend service + host (str): the host address by which the client access the frontend service, for detecting UserRegion time_zone (str, optional): timezone of the frontend service Returns: @@ -124,6 +124,7 @@ class SignInManager: warning="The auth code is invalid.", properties={"email": email, "code": code}, ) + # TODO refactor this to reduce None return UserLoginAction.VERIFY_EMAIL_WITH_AUTH_CODE, None, None, None, None, None, None async def signin_with_email_and_password( @@ -138,6 +139,7 @@ class SignInManager: if is_new_user: # cannot find the email address + # TODO refactor this to reduce None return (UserLoginAction.VERIFY_EMAIL_WITH_AUTH_CODE, None, None, None, None, None) else: if await self.user_auth_service.is_password_reset_required(user_id): @@ -182,6 +184,7 @@ class SignInManager: else: # ask user to input password again. # TODO: we need to limit times of user to input the wrong password + # TODO refactor this to reduce None return ( UserLoginAction.EXISTING_USER_PASSWORD_REQUIRED, None,