mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:15:56 +00:00
otp: use application name in provisioning uri
This commit is contained in:
@@ -888,7 +888,9 @@ class Pref_Prefs extends Handler_Protected {
|
|||||||
if (!$otp_enabled) {
|
if (!$otp_enabled) {
|
||||||
$secret = $base32->encode(sha1($this->dbh->fetch_result($result, 0, "salt")));
|
$secret = $base32->encode(sha1($this->dbh->fetch_result($result, 0, "salt")));
|
||||||
$topt = new \OTPHP\TOTP($secret);
|
$topt = new \OTPHP\TOTP($secret);
|
||||||
print QRcode::png($topt->provisioning_uri($login));
|
print QRcode::png("otpauth://totp/".urlencode($login).
|
||||||
|
"?secret=$secret&issuer=".urlencode("Tiny Tiny RSS"));
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user