Release v2.11.1
This commit is contained in:
1 parent
2c150b5b2e
commit
98f969ca0f
104 files changed
+3559
-447
No files matched your search
+6
-1
@@ -7,6 +7,10 @@ const PASSWORD_KEY_LENGTH = 32;
|
||||
const PASSWORD_DIGEST = 'sha256';
|
||||
const SESSION_BYTES = 32;
|
||||
|
||||
function createOneTimeToken() {
|
||||
return crypto.randomBytes(32).toString('hex');
|
||||
}
|
||||
|
||||
function validatePasswordStrength(password, options) {
|
||||
const value = String(password || '');
|
||||
const requirements = options && options.policy
|
||||
@@ -91,5 +95,6 @@ module.exports = {
|
||||
verifyPassword,
|
||||
validatePasswordStrength,
|
||||
createSessionToken,
|
||||
hashSessionToken
|
||||
hashSessionToken,
|
||||
createOneTimeToken
|
||||
};
|
||||
Reference in new issue
Block a user