Closed okawaffles closed 1 year ago
const genNewToken = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join(''); Math.random() should not be used for security. Instead, the node:crypto library should be used.
const genNewToken = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
Math.random()
const genNewToken = size => [...Array(size)].map(() => Math.floor(Math.random() * 16).toString(16)).join('');
Math.random()
should not be used for security. Instead, the node:crypto library should be used.