Permalink
Browse files

must return number token as a string

  • Loading branch information...
strictd committed Oct 19, 2016
1 parent 775f12f commit e644a51fc109a40e6ca6da572cf8d472f2f420f8
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/passwordless/passwordless.js
@@ -639,7 +639,7 @@ Passwordless.prototype._generateToken = function(randomBytes) {
*/
Passwordless.prototype._generateNumberToken = function(max) {
var buf = crypto.randomBytes(4);
return Math.floor(buf.readUInt32BE(0)%max);
return Math.floor(buf.readUInt32BE(0)%max).toString();
};

module.exports = Passwordless;

0 comments on commit e644a51

Please sign in to comment.