Google 2 Factor Authentication QR Code Issues
<p>I'm attempting to create a Google 2 Factor Authorisation just as an experiment not for any real practical reason.</p>

<p>I'm using the code supplied from: <a href="http://www.idontplaydarts.com/wp-content/uploads/2011/07/ga.php_.txt" rel="nofollow">here</a></p>

<p>I build a QR Code URL via a function which has two parameters, $username and $secret</p>

<p><code>$qrcode_url = "https://www.google.com/chart?chs=200x200&amp;chld=M|0&amp;cht=qr&amp;chl=otpauth://totp/{$username}%3Fsecret%3D{$secret}";</code></p>

<p>This correctly builds a URL.</p>

<p>The <code>$username</code> parameter is the user being logged in.</p>

<p>The <code>$secret</code> parameter is generated by <code>Google2FA::generate_secret_key()</code></p>

<p>However, when I load a page which requests the QR Code, Google proclaims it 'Your client has issued a malformed or illegal request'. This is where is gets annoying. If I click the address bar and send the request again it will load the QR Code which supplies a correct OTP (one time password). Then if I reload the page with the QR Code on it, this will also load correctly.</p>

<p>Any ideas as to what is causing this issue? It wouldn't be anything to do with the fact I'm running it on XAMPP locally, does it?</p>

<p>Thanks in advance! :]</p>

<p>EDIT: Just to let you know, I don't think it's a Cache issue as I've cleared that and it still borks up.</p>
