mirror of
https://github.com/itflow-org/itflow
synced 2026-03-05 21:34:51 +00:00
Revert "Adjusted the 2FA QR code generator for easier setup/identification in the 2FA app"
This reverts commit 61e100c98b.
This commit is contained in:
@@ -58,10 +58,10 @@
|
|||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function getBarCodeUrl($app_name, $email, $secretkey, $issuer) {
|
public static function getBarCodeUrl($username, $domain, $secretkey, $issuer) {
|
||||||
$url = "http://chart.apis.google.com/chart";
|
$url = "http://chart.apis.google.com/chart";
|
||||||
$url = $url."?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/";
|
$url = $url."?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/";
|
||||||
$url = $url.$app_name . ": " . $email . "%3Fsecret%3D" . $secretkey . '%26issuer%3D' . rawurlencode($issuer);
|
$url = $url.$username . "@" . $domain . "%3Fsecret%3D" . $secretkey . '%26issuer%3D' . rawurlencode($issuer);
|
||||||
|
|
||||||
return $url;
|
return $url;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ $sql_recent_logs = mysqli_query($mysqli, "SELECT * FROM logs
|
|||||||
if (!empty($session_token)) {
|
if (!empty($session_token)) {
|
||||||
|
|
||||||
//Generate QR Code based off the generated key
|
//Generate QR Code based off the generated key
|
||||||
print sprintf('<img src="%s"/>',TokenAuth6238::getBarCodeUrl($config_app_name, $session_email, $session_token, $_SERVER['SERVER_NAME']));
|
print sprintf('<img src="%s"/>',TokenAuth6238::getBarCodeUrl($session_name,' ',$session_token,$_SERVER['SERVER_NAME']));
|
||||||
|
|
||||||
echo "<p class='text-secondary'>$session_token</p>";
|
echo "<p class='text-secondary'>$session_token</p>";
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user