UNPKG

feathers-authentication-management

Version:

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

13 lines (12 loc) 387 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.randomDigits = void 0; const crypto_1 = require("crypto"); function randomDigits(len) { let str = ''; while (str.length < len) { str += parseInt('0x' + (0, crypto_1.randomBytes)(4).toString('hex')).toString(); } return str.substr(0, len); } exports.randomDigits = randomDigits;