Fixed TOTP for client logins

This commit is contained in:
johnnyq
2021-12-04 21:00:34 -05:00
parent e36739297d
commit 53380718b1
4 changed files with 98 additions and 3 deletions

View File

@@ -1,4 +1,6 @@
<?php
<?php
require_once("rfc6238.php");
//Paging
if(isset($_GET['p'])){
@@ -115,7 +117,7 @@ $num_rows = mysqli_fetch_row(mysqli_query($mysqli,"SELECT FOUND_ROWS()"));
if(empty($login_otp_secret)){
$otp_display = "-";
}else{
$otp = get_otp($login_otp_secret);
$otp = TokenAuth6238::getTokenCode($login_otp_secret,$rangein30s = 3);
$otp_display = "<i class='far fa-clock text-secondary'></i> $otp<button class='btn btn-sm' data-clipboard-text='$otp'><i class='far fa-copy text-secondary'></i></button>";
}
$login_note = $row['login_note'];