alter login flow to allow for email auth login

This commit is contained in:
chrisw
2017-11-07 16:11:31 +00:00
parent ef5f5ca43a
commit 1effec78e5
10 changed files with 334 additions and 34 deletions

View File

@@ -88,8 +88,10 @@ class UserApiClient(NotifyAdminAPIClient):
if e.status_code == 400 or e.status_code == 404:
return False
def send_verify_code(self, user_id, code_type, to):
def send_verify_code(self, user_id, code_type, to, next_string=None):
data = {'to': to}
if next_string:
data['next'] = next_string
endpoint = '/user/{0}/{1}-code'.format(user_id, code_type)
self.post(endpoint, data=data)