ensure other 2FA pages also handle session id

specifically, the 2FA page when you first create an account is different to the login 2FA page
and also the 2FA page when you change your phone number is different as well
This commit is contained in:
Leo Hemsted
2017-02-24 16:21:41 +00:00
parent 1ec20151d0
commit 4df12f5f4e
6 changed files with 44 additions and 57 deletions

View File

@@ -26,8 +26,7 @@ def two_factor():
if form.validate_on_submit():
try:
user = user_api_client.get_user(user_id)
# the user will have a new current_session_id set by the API - store it in the cookie so we can match it in
# future requests
# the user will have a new current_session_id set by the API - store it in the cookie for future requests
session['current_session_id'] = user.current_session_id
services = service_api_client.get_active_services({'user_id': str(user_id)}).get('data', [])
# Check if coming from new password page