mirror of https://gitlab.com/tildes/tildes.git
Browse Source
Make some follow-up adjustments to 2FA
Make some follow-up adjustments to 2FA
Nothing too significant in here, just a few adjustments and other follow-ups that I wanted to do: * Make backup code usage a bit more lenient - allow uppercase, and doesn't need exact spacing as originally displayed. * Display the backup codes a little more nicely. * Change the message on the settings page based on whether 2FA is enabled or not. * Use webargs instead of request.params.getmerge-requests/29/head
Deimos
6 years ago
9 changed files with 59 additions and 48 deletions
-
17tildes/tildes/lib/string.py
-
11tildes/tildes/models/user/user.py
-
12tildes/tildes/models/user/user_invite_code.py
-
11tildes/tildes/templates/intercooler/two_factor_enabled.jinja2
-
9tildes/tildes/templates/settings.jinja2
-
2tildes/tildes/templates/settings_two_factor.jinja2
-
39tildes/tildes/views/api/web/user.py
-
5tildes/tildes/views/login.py
-
1tildes/tildes/views/settings.py
@ -1,10 +1,11 @@ |
|||
<p>Congratulations! Two-factor authentication has been enabled.</p> |
|||
|
|||
<p>These are your backup codes. <strong class="text-warning">Make sure to write them down and store them in a safe place.</strong> |
|||
In the event that you lose access to your authenticator device, you will need these to regain access to your account. Each code can only be used once.</p> |
|||
<p>These are your backup codes. In the event that you lose access to your authenticator device, you will need one of these codes to regain access to your account (or disable two-factor authentication). Each code can only be used once.</p> |
|||
|
|||
<code> |
|||
<p><strong class="text-warning">Make sure to write them down and store them in a safe place.</strong></p> |
|||
|
|||
<ol> |
|||
{% for code in backup_codes %} |
|||
- {{ code }}<br /> |
|||
<li><code>{{ code }}</code></li> |
|||
{% endfor %} |
|||
</code> |
|||
</ol> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue