First of all thanks for this simple yet effective code.
I'm not so sure if this is the right place to ask about this, but I would like to mention that while generating QR code this code is used
TokenAuth6238::getBarCodeUrl( 'user', 'domain', $secretkey, 'websiteservice' ))
now when scan by an app, it shows user@domain. The problem is as a user, I may find it difficult to link the two, when I use an email to login to a service. So, as a developer, I want to implement something like this
TokenAuth6238::getBarCodeUrl( 'email@address',$secretkey, 'websiteservice' ))
For my project I'm planning to tweak the core code as follows
public static function getBarCodeUrl($useremail, $secretkey, $issuer) {
$url = "http://chart.apis.google.com/chart";
$url = $url . "?chs=200x200&chld=M|0&cht=qr&chl=otpauth://totp/";
$url = $url . $useremail . "%3Fsecret%3D" . $secretkey . '%26issuer%3D' . rawurlencode($issuer);
return $url;
}
But I'm afraid it would break there is any update to this library.
First of all thanks for this simple yet effective code.
I'm not so sure if this is the right place to ask about this, but I would like to mention that while generating QR code this code is used
TokenAuth6238::getBarCodeUrl( 'user', 'domain', $secretkey, 'websiteservice' ))now when scan by an app, it shows
user@domain. The problem is as a user, I may find it difficult to link the two, when I use an email to login to a service. So, as a developer, I want to implement something like thisTokenAuth6238::getBarCodeUrl( 'email@address',$secretkey, 'websiteservice' ))For my project I'm planning to tweak the core code as follows
But I'm afraid it would break there is any update to this library.