How do I generate a reset password in node.js that can be used in a URL?
I only need a way to generate a token:
user.reset_password_token = ???; user.reset_password_expire = expire_date;
Edit - here is the solution:
user.reset_password_token = require('crypto').randomBytes(32).toString('hex');
chovy source share