title: Google authenticator invalid barcode on scan
body: <p>here's my code in generating the qr code</p>
  
  <pre><code>public function getUrl($user, $hostname, $secret) {
        $encoder = "https://chart.googleapis.com/chart?chs=200x200&amp;chld=M%70&amp;cht=qr&amp;chl=";
        $encoderURL = sprintf( "%sotpauth://totp/%s@%s",$encoder, $user, $hostname);
        $finalEncodorURL = $encoderURL . "%26secret=". urlencode($secret);
        return $finalEncodorURL;
  }
  </code></pre>
  
  <p>supposedly this will generate a qr code, and it does. but when i scan this code using google authenticator app, it will generate an error</p>
  
  <pre><code>The barcode 'otpauth://totp/user4@noemail.com&amp;secret=UOPKN6QFW3J6PW74' is not a valid authentication barcode.
  </code></pre>
  
  <p>but when "manual entry" using the secret key, it'll work and i can login just fine using the generated key.</p>
  
  <p>i found stuffs in the internet saying i should urlencode the data, i did, but still it wont work.</p>
  
  <p>here's a sample url generated by the function above:</p>
  
  <pre><code>https://chart.googleapis.com/chart?chs=200x200&amp;chld=M%70&amp;cht=qr&amp;chl=otpauth://totp/user4@noemail.com%26secret=UOPKN6QFW3J6PW74
  </code></pre>
  
  <p>am i missing something or did something wrong?</p>