##// END OF EJS Templates
feat(2fa): refactor logic arround validation/recoverycodes and workflows of configuration of 2fa...
feat(2fa): refactor logic arround validation/recoverycodes and workflows of configuration of 2fa - recovery codes are shown in 1 place only - save status about view of recovery codes - made the logic of saving states into user_data more explicit and no longer relly on hacky DB transaction logic - turn JS forms into a regular forms

File last commit:

r5367:a11e6ff3 default
r5367:a11e6ff3 default
Show More
verify_2fa.mako
54 lines | 1.8 KiB | application/x-mako | MakoHtmlLexer
<%inherit file="base/root.mako"/>
<%def name="title()">
${_('Verify 2FA')}
%if c.rhodecode_name:
&middot; ${h.branding(c.rhodecode_name)}
%endif
</%def>
<style>body{background-color:#eeeeee;}</style>
<div class="loginbox">
<div class="header-account">
<div id="header-inner" class="title">
<div id="logo">
% if c.rhodecode_name:
<div class="branding">
<a href="${h.route_path('home')}">${h.branding(c.rhodecode_name)}</a>
</div>
% endif
</div>
</div>
</div>
<div class="loginwrapper">
<rhodecode-toast id="notifications"></rhodecode-toast>
<div id="register">
<div class="sign-in-title">
<h1>${_('Verify the code from the app')}</h1>
</div>
<div class="inner form">
${h.secure_form(h.route_path('check_2fa'), request=request, id='totp_form')}
<label for="totp">${_('Verification code')}:</label>
${h.text('totp', class_="form-control")}
%if 'totp' in errors:
<span class="error-message">${errors.get('totp')}</span>
<br />
%endif
<p class="help-block">${_('Enter the code from your two-factor authenticator app. If you\'ve lost your device, you can enter one of your recovery codes.')}</p>
${h.submit('send', _('Verify'), class_="btn sign-in")}
<p class="help-block pull-right">
RhodeCode ${c.rhodecode_edition}
</p>
${h.end_form()}
</div>
</div>
</div>
</div>