refactor module & reset token
This commit is contained in:
5
apps/backend/src/lib/crypto.ts
Normal file
5
apps/backend/src/lib/crypto.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import * as crypto from 'crypto';
|
||||
|
||||
export function generateSecureToken(length = 32) {
|
||||
return crypto.randomBytes(length).toString('hex');
|
||||
}
|
||||
Reference in New Issue
Block a user