otp: use application name in provisioning uri

This commit is contained in:
Andrew Dolgov 2014-01-19 00:29:42 +04:00
parent 4c63934bac
commit ab85ad89b3
1 changed files with 3 additions and 1 deletions

View File

@ -888,7 +888,9 @@ class Pref_Prefs extends Handler_Protected {
if (!$otp_enabled) {
$secret = $base32->encode(sha1($this->dbh->fetch_result($result, 0, "salt")));
$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"));
}
}