Bypass 2FA after successful login #72

Merged
pierre merged 6 commits from bypass_2fa_after_successful_login into master 2022-11-12 11:21:34 +00:00
Showing only changes of commit 7887ccaa41 - Show all commits

View File

@ -34,6 +34,28 @@
</tbody> </tbody>
</table> </table>
{% if !user.last_successful_2fa.is_empty() %}
<h5 style="margin-top: 50px">Successful 2FA login history</h5>
<table class="table table-hover" style="max-width: 800px;" aria-describedby="Factors list">
<thead>
<tr>
<th scope="col">IP address</th>
<th scope="col">Date</th>
<th scope="col">Bypass 2FA</th>
</tr>
</thead>
<tbody>
{% for e in user.get_formatted_2fa_successful_logins() %}
<tr>
<td>{{ e.ip }}</td>
<td>{{ e.fmt_time() }}</td>
<td>{% if e.can_bypass_2fa %}YES{% else %}NO{% endif %}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
<script> <script>
async function delete_factor(id) { async function delete_factor(id) {
if (!confirm("Do you really want to remove this factor?")) if (!confirm("Do you really want to remove this factor?"))