UNPKG

feathers-authentication-management

Version:

Adds sign up verification, forgotten password reset, and other capabilities to local feathers-authentication

15 lines (9 loc) 272 B
const crypto = require('crypto'); module.exports = randomDigits; function randomDigits (len) { let str = ''; while (str.length < len) { str += parseInt('0x' + crypto.randomBytes(4).toString('hex')).toString(); } return str.substr(0, len); }