Initial mfa support (for internal users) #93591

Merged
Oleg-Komarov merged 46 commits from mfa into main 2024-08-29 11:44:06 +02:00
2 changed files with 2 additions and 2 deletions
Showing only changes of commit 7d0aa08001 - Show all commits

View File

@ -65,7 +65,7 @@ Multi-factor Authentication Setup
{% if recovery_codes %} {% if recovery_codes %}
<ul> <ul>
{% for code in recovery_codes %} {% for code in recovery_codes %}
<li>{{ code }}</li> <li><code>{{ code }}</code></li>
{% endfor %} {% endfor %}
</ul> </ul>
{% endif %} {% endif %}

View File

@ -70,7 +70,7 @@ class GenerateRecoveryView(mixins.MfaRequiredIfConfiguredMixin, View):
# https://pages.nist.gov/800-63-3/sp800-63b.html#5122-look-up-secret-verifiers # https://pages.nist.gov/800-63-3/sp800-63b.html#5122-look-up-secret-verifiers
# don't use less than 64 bits # don't use less than 64 bits
device.token_set.create(token=random_hex(8).upper()) device.token_set.create(token=random_hex(8).upper())
return redirect(reverse('bid_main:mfa') + '?display_recovery_codes=1') return redirect(reverse('bid_main:mfa') + '?display_recovery_codes=1#recovery-codes')
class InvalidateRecoveryView(mixins.MfaRequiredIfConfiguredMixin, View): class InvalidateRecoveryView(mixins.MfaRequiredIfConfiguredMixin, View):