mirror of https://github.com/itflow-org/itflow
fix mfa model
This commit is contained in:
parent
dba08714bf
commit
52a27699f1
|
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
require_once '../plugins/totp/totp.php';
|
||||
require_once '../../plugins/totp/totp.php';
|
||||
|
||||
// Only generate the token once and store it in session:
|
||||
if (empty($_SESSION['mfa_token'])) {
|
||||
|
|
@ -27,7 +27,7 @@ $data = "otpauth://totp/ITFlow:$session_email?secret=$token";
|
|||
<div class="modal-body">
|
||||
|
||||
<div class="text-center">
|
||||
<img src='../plugins/barcode/barcode.php?f=png&s=qr&d=<?php echo $data; ?>'>
|
||||
<img src='../../plugins/barcode/barcode.php?f=png&s=qr&d=<?php echo $data; ?>'>
|
||||
<p><span class='text-secondary'>Secret:</span> <?php echo $token; ?>
|
||||
<button type="button" class='btn btn-sm clipboardjs' data-clipboard-text='<?php echo $token; ?>'><i class='far fa-copy text-secondary'></i></button>
|
||||
</p>
|
||||
|
|
@ -51,3 +51,4 @@ $data = "otpauth://totp/ITFlow:$session_email?secret=$token";
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ $remember_token_count = mysqli_num_rows($sql_remember_tokens);
|
|||
<i class="fas fa-lock mr-2"></i>Enable MFA
|
||||
</button>
|
||||
|
||||
<?php require_once "/modals/user_mfa_modal.php"; ?>
|
||||
<?php require_once "modals/user_mfa_modal.php"; ?>
|
||||
|
||||
<?php } else { ?>
|
||||
<a href="post.php?disable_mfa&csrf_token=<?php echo $_SESSION['csrf_token'] ?>" class="btn btn-danger"><i class="fas fa-unlock mr-2"></i>Disable MFA</a>
|
||||
|
|
|
|||
Loading…
Reference in New Issue