feat: add password reset functionality and email notifications
- Implemented forgot password and reset password routes in the backend. - Added email sending capabilities using Nodemailer for password reset requests. - Created ResetPassword page in the frontend for users to reset their passwords. - Updated user model to include reset token and expiry fields. - Integrated hiscores API with caching mechanism for improved performance. - Enhanced authentication modal to include forgot password option. - Updated environment configuration for SMTP settings.
This commit is contained in:
@@ -13,6 +13,14 @@ module.exports = {
|
||||
BACKEND_SECRET: 'A1bC3dE5fG7hI9jK1lM3nO5pQ7rS9tU1vW3xY5zA7bC9dE1f',
|
||||
CORS_ORIGINS: 'https://leagues.tools,https://www.leagues.tools,http://localhost:3002',
|
||||
FRONTEND_BUILD_PATH: '../os-league-tools-master/build',
|
||||
APP_URL: 'https://leagues.tools',
|
||||
// SMTP Configuration - fill in your server details
|
||||
SMTP_HOST: 'yeahnah-net.mail.protection.outlook.com', // e.g., 'smtp.gmail.com' or 'mail.yourserver.com'
|
||||
SMTP_PORT: '25', // 587 for TLS, 465 for SSL
|
||||
SMTP_SECURE: 'false', // 'true' for port 465, 'false' for 587
|
||||
SMTP_USER: 'bailey@yeahnah.net', // SMTP username/email
|
||||
SMTP_PASS: 'Howaboutno123!', // SMTP password or app password
|
||||
SMTP_FROM: 'noreply@leagues.tools', // From address for emails
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -28,6 +36,14 @@ module.exports = {
|
||||
BACKEND_SECRET: 'A1bC3dE5fG7hI9jK1lM3nO5pQ7rS9tU1vW3xY5zA7bC9dE1f',
|
||||
CORS_ORIGINS: 'http://localhost:3000,http://localhost:3001,https://dev.leagues.tools',
|
||||
FRONTEND_BUILD_PATH: '../os-league-tools-master/build',
|
||||
APP_URL: 'https://dev.leagues.tools',
|
||||
// SMTP Configuration - same as prod or leave empty for console logging
|
||||
SMTP_HOST: 'yeahnah-net.mail.protection.outlook.com',
|
||||
SMTP_PORT: '25',
|
||||
SMTP_SECURE: 'false',
|
||||
SMTP_USER: 'bailey@yeahnah.net',
|
||||
SMTP_PASS: 'Howaboutno123!',
|
||||
SMTP_FROM: 'noreply@leagues.tools',
|
||||
},
|
||||
},
|
||||
{
|
||||
@@ -43,3 +59,5 @@ module.exports = {
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user