Permalink
Browse files

Merge pull request #2 from jhitesma/master

Fixed QR code URL
  • Loading branch information...
2 parents 502c7d2 + 45bc728 commit f9e26734fde1030bb7305178d7fd1d3334f4540b @chregu committed Aug 8, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/GoogleAuthenticator.php
@@ -66,7 +66,7 @@ protected function hashToInt($bytes, $start) {
public function getUrl($user, $hostname, $secret) {
$url = sprintf("otpauth://totp/%s@%s?secret=%s", $user, $hostname, $secret);
$encoder = "https://www.google.com/chart?chs=200x200&chld=M|0&cht=qr&chl=";
- $encoderURL = sprintf( "%sotpauth://totp/%s@%s%%3Fsecret%%3D%s",$encoder, $user, $hostname, $secret);
+ $encoderURL = sprintf( "%sotpauth://totp/%s@%s&secret=%s",$encoder, $user, $hostname, $secret);
return $encoderURL;

1 comment on commit f9e2673

Odd, I had to change this back for it to generate a proper QR code.

Please sign in to comment.