2FA QR Codes

Move away from the Google Charts API for generating QR codes as this is currently broken and not a security best practice.
This commit is contained in:
Marcus Hill
2024-05-26 16:08:06 +01:00
parent c02d6d4cf0
commit 8b1ba7028e
4 changed files with 3355 additions and 12 deletions

View File

@@ -58,14 +58,6 @@ class TokenAuth6238 {
return $result;
}
public static function getBarCodeUrl($username, $domain, $secretkey, $issuer) {
$url = "https://chart.apis.google.com/chart";
$url = $url."?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/";
$url = $url.$username . "@" . $domain . "%3Fsecret%3D" . $secretkey . '%26issuer%3D' . rawurlencode($issuer);
return $url;
}
private static function oath_hotp ($key, $counter, $debug=false) {
$result = "";
$orgcounter = $counter;