speakeasyjs / speakeasy

**NOT MAINTAINED** Two-factor authentication for Node.js. One-time passcode generator (HOTP/TOTP) with support for Google Authenticator.
MIT License
2.71k stars 229 forks source link

Documentation not up to date (node-qrcode) #88

Closed ghost closed 7 years ago

ghost commented 7 years ago
// Use the node-qrcode package
// npm install --save node-qrcode
var QRCode = require('qrcode');

// Get the data URL of the authenticator URL
QRCode.toDataURL(secret.otpauth_url, function(err, data_url) {
  console.log(data_url);

  // Display this data URL to the user in an <img> tag
  // Example:
  write('<img src="' + data_url + '">');
});

The node-qrcode package is now installed with npm install --save qrcode, node-qrcode points to a different package now.

https://github.com/soldair/node-qrcode