feat(role): update docs
This commit is contained in:
parent
69d1007ddf
commit
e2f51d09da
@ -45,7 +45,7 @@ class SignInManager:
|
|||||||
Args:
|
Args:
|
||||||
email (str): email address
|
email (str): email address
|
||||||
code (str): auth code to be verified
|
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
|
time_zone (str, optional): timezone of the frontend service
|
||||||
|
|
||||||
Returns:
|
Returns:
|
||||||
@ -124,6 +124,7 @@ class SignInManager:
|
|||||||
warning="The auth code is invalid.",
|
warning="The auth code is invalid.",
|
||||||
properties={"email": email, "code": code},
|
properties={"email": email, "code": code},
|
||||||
)
|
)
|
||||||
|
# TODO refactor this to reduce None
|
||||||
return UserLoginAction.VERIFY_EMAIL_WITH_AUTH_CODE, None, None, None, None, None, None
|
return UserLoginAction.VERIFY_EMAIL_WITH_AUTH_CODE, None, None, None, None, None, None
|
||||||
|
|
||||||
async def signin_with_email_and_password(
|
async def signin_with_email_and_password(
|
||||||
@ -138,6 +139,7 @@ class SignInManager:
|
|||||||
|
|
||||||
if is_new_user:
|
if is_new_user:
|
||||||
# cannot find the email address
|
# cannot find the email address
|
||||||
|
# TODO refactor this to reduce None
|
||||||
return (UserLoginAction.VERIFY_EMAIL_WITH_AUTH_CODE, None, None, None, None, None)
|
return (UserLoginAction.VERIFY_EMAIL_WITH_AUTH_CODE, None, None, None, None, None)
|
||||||
else:
|
else:
|
||||||
if await self.user_auth_service.is_password_reset_required(user_id):
|
if await self.user_auth_service.is_password_reset_required(user_id):
|
||||||
@ -182,6 +184,7 @@ class SignInManager:
|
|||||||
else:
|
else:
|
||||||
# ask user to input password again.
|
# ask user to input password again.
|
||||||
# TODO: we need to limit times of user to input the wrong password
|
# TODO: we need to limit times of user to input the wrong password
|
||||||
|
# TODO refactor this to reduce None
|
||||||
return (
|
return (
|
||||||
UserLoginAction.EXISTING_USER_PASSWORD_REQUIRED,
|
UserLoginAction.EXISTING_USER_PASSWORD_REQUIRED,
|
||||||
None,
|
None,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user