Skip to content

Commit

Permalink
Merge 3b88323 into e63b936
Browse files Browse the repository at this point in the history
  • Loading branch information
railsstudent committed Jun 21, 2017
2 parents e63b936 + 3b88323 commit c5f9cf8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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

0 comments on commit c5f9cf8

Please sign in to comment.