mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-18 13:39:41 -04:00
create webauthn 2fa page
if user has `webauthn_auth` as their auth type, then redirect them to an interstitial that prompts them to click on a button which right now just logs to the JS console, but in a future commit will open up the webauthn browser prompt content is unsurprisingly not final.
This commit is contained in:
@@ -50,7 +50,7 @@ def sign_in():
|
||||
if user.email_auth:
|
||||
return redirect(url_for('.two_factor_email_sent', next=redirect_url))
|
||||
if user.webauthn_auth:
|
||||
raise NotImplementedError('webauthn not supported yet')
|
||||
return redirect(url_for('.two_factor_webauthn', next=redirect_url))
|
||||
|
||||
# Vague error message for login in case of user not known, locked, inactive or password not verified
|
||||
flash(Markup(
|
||||
|
||||
@@ -82,6 +82,13 @@ def two_factor():
|
||||
return render_template('views/two-factor.html', form=form, redirect_url=redirect_url)
|
||||
|
||||
|
||||
@main.route('/two-factor-webauthn', methods=['GET'])
|
||||
@redirect_to_sign_in
|
||||
def two_factor_webauthn():
|
||||
redirect_url = request.args.get('next')
|
||||
return render_template('views/two-factor-webauthn.html', redirect_url=redirect_url)
|
||||
|
||||
|
||||
@main.route('/re-validate-email', methods=['GET'])
|
||||
def revalidate_email_sent():
|
||||
title = 'Email resent' if request.args.get('email_resent') else 'Check your email'
|
||||
|
||||
Reference in New Issue
Block a user