feat(role): update docs
This commit is contained in:
parent
69d1007ddf
commit
e2f51d09da
@ -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,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user