Changed registration flow to first send email verification link that

when visited sends sms code for second step of account verification.

At that second step user enters just sms code sent to users mobile
number.

Also moved dao calls that simply proxied calls to client to calling
client directly.

There is still a place where a user will be a sent a code for
verification to their email namely if they update email address.
This commit is contained in:
Adam Shimali
2016-03-17 13:07:52 +00:00
parent dcc253bf61
commit 2792bece54
23 changed files with 363 additions and 481 deletions

View File

@@ -43,20 +43,11 @@ def increment_failed_login_count(id):
def activate_user(user):
user.state = 'active'
return user_api_client.update_user(user)
return user_api_client.activate_user(user)
def is_email_unique(email_address):
try:
if user_api_client.get_user_by_email(email_address):
return False
return True
except HTTPError as ex:
if ex.status_code == 404:
return True
else:
raise ex
return user_api_client.is_email_unique(email_address)
def send_verify_code(user_id, code_type, to):