diff --git a/lib/generate.js b/lib/generate.js index 6428dc5..89f78a7 100644 --- a/lib/generate.js +++ b/lib/generate.js @@ -38,10 +38,10 @@ function randomString(options) { * @param {String} name * @return {String} */ -function otpauth(key, name) { +function otpauth(key, name, issuer) { var code = 'otpauth://totp/' + encodeURIComponent(name); code += '?secret=' + encodeURIComponent(key); - code += '&issuer=' + encodeURIComponent('One Sony'); + code += '&issuer=' + encodeURIComponent(issuer); return code; } @@ -68,14 +68,14 @@ function link(key, options) { * @param {Object} options * @return {Stream} */ -function qrcode(key, name, options) { +function qrcode(key, name, issuer, options) { // Options options = _.extend({ type: 'svg', sync: false }, options || {}); - var link = otpauth(key, name); + var link = otpauth(key, name, issuer); if (options.sync) { return qr.imageSync(link, {