Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revise qrcode documentation #89

Merged
merged 8 commits into from Sep 14, 2017
4 changes: 2 additions & 2 deletions README.md
Expand Up @@ -80,8 +80,8 @@ Next, we'll want to display a QR code to the user so they can scan in the secret
Use a QR code module to generate a QR code that stores the data in `secret.otpauth_url`, and then display the QR code to the user. This is one simple way to do it, which generates a PNG data URL which you can put into an `<img>` tag on a webpage:

```js
// Use the node-qrcode package
// npm install --save node-qrcode
// Use the qrcode package
// npm install --save qrcode
var QRCode = require('qrcode');

// Get the data URL of the authenticator URL
Expand Down
2 changes: 1 addition & 1 deletion test/generate.js
Expand Up @@ -117,7 +117,7 @@ describe('Generator tests', function () {
var secret = new Buffer(answer.base32, 'ascii');
if (Buffer.isBuffer(secret)) secret = base32.encode(secret);

var google_chart_url = 'https://chart.googleapis.com/chart?chs=166x166&chld=L|0&cht=qr&chl=';
var google_chart_url = 'https://chart.googleapis.com/chart?chs=166x166&chld=L|0&cht=qr&chl=';
var encodedOtpUrl = encodeURIComponent('otpauth://totp/Example%3Aalice%40google.com?secret=' + secret + '&algorithm=SHA1&digits=6&period=30');
var expect = google_chart_url + encodedOtpUrl;
assert.deepEqual(
Expand Down