From 53380718b141072f532746135abffc5627978801 Mon Sep 17 00:00:00 2001 From: johnnyq Date: Sat, 4 Dec 2021 21:00:34 -0500 Subject: [PATCH] Fixed TOTP for client logins --- client_logins.php | 6 ++-- settings-user.php | 3 +- totp-test.php | 80 +++++++++++++++++++++++++++++++++++++++++++++++ totp-test2.php | 12 +++++++ 4 files changed, 98 insertions(+), 3 deletions(-) create mode 100644 totp-test.php create mode 100644 totp-test2.php diff --git a/client_logins.php b/client_logins.php index be7b8397..7d8cc108 100644 --- a/client_logins.php +++ b/client_logins.php @@ -1,4 +1,6 @@ - $otp"; } $login_note = $row['login_note']; diff --git a/settings-user.php b/settings-user.php index c5635290..ad44bc1f 100644 --- a/settings-user.php +++ b/settings-user.php @@ -87,12 +87,13 @@ $sql_recent_logs = mysqli_query($mysqli,"SELECT * FROM logs if(!empty($session_token)){ //Generate QR Code based off the generated key print sprintf('',TokenAuth6238::getBarCodeUrl('','',$session_token,$config_company_name)); + + echo "

$secretkey

"; } ?> -
diff --git a/totp-test.php b/totp-test.php new file mode 100644 index 00000000..eaa31f00 --- /dev/null +++ b/totp-test.php @@ -0,0 +1,80 @@ +"; + +echo "secret Key is: $secretkey
"; + + +$test = totp("sha1","$secretkey","$unixtimestamp",30,6); + +echo "
code is: $test"; + + +?> \ No newline at end of file diff --git a/totp-test2.php b/totp-test2.php new file mode 100644 index 00000000..a0ac8027 --- /dev/null +++ b/totp-test2.php @@ -0,0 +1,12 @@ + \ No newline at end of file