mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-07 04:28:25 -04:00
when not logged in, redirect to sign-in
parts of the initial setup/login stages were throwing 500s if user not already in process (ie: user directly navigated to url): * /resend-email-verification * /text-not-received * /send-new-code * verify
This commit is contained in:
@@ -18,14 +18,14 @@ from notifications_utils.url_safe_token import check_token
|
||||
|
||||
from app.main import main
|
||||
from app.main.forms import TwoFactorForm
|
||||
from app.utils import redirect_to_sign_in
|
||||
|
||||
from app import user_api_client
|
||||
|
||||
|
||||
@main.route('/verify', methods=['GET', 'POST'])
|
||||
@redirect_to_sign_in
|
||||
def verify():
|
||||
# TODO there needs to be a way to regenerate a session id
|
||||
# or handle gracefully.
|
||||
user_id = session['user_details']['id']
|
||||
|
||||
def _check_code(code):
|
||||
|
||||
Reference in New Issue
Block a user