Improve 2FA : show expected code,

improve explanation
This commit is contained in:
sparkyx 2026-04-28 12:41:56 +02:00
parent 79e603b700
commit 5527d4f053
2 changed files with 97 additions and 18 deletions

View file

@ -42,6 +42,23 @@ MaintenanceMode("block.html");
$http=new HttpInput();
//------------------------------------------------
// refresh code from otp-link.php
//------------------------------------------------
if ($http->post("action","string","xx")=="qr_refresh") {
try {
$authenticator = new \Noalyss\OTP();
$secret=$http->post("secret");
echo $authenticator->compute_code($secret);
} catch (Exception $exc) {
record_log("refresh BarCode invalide");
}
return;
}
// TVA id or TVA code
$t=$http->get("t");
// string qcode card