Created
October 18, 2020 13:24
-
-
Save nosvalds/43ddb31ac39ee704615491e5c5b01dc6 to your computer and use it in GitHub Desktop.
Function to create a password reset token
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Create password reset token using inbuilt crypto | |
*/ | |
const createResetToken = () => { | |
return require('crypto').randomBytes(32).toString('hex') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment