Skip to content

Commit a7202f8

Browse files
committed
email pass change
1 parent b4ab59a commit a7202f8

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

server/app.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ dotenv.config();
2020

2121
const app = express();
2222

23-
app.use(cors({ origin: "https://codequest.srkrcodingclub.in", credentials: true }));
24-
23+
app.use(cors({ origin: process.env.CLIENT_URL, credentials: true }));
2524

2625
// Increased payload size limit
2726
app.use(express.json({ limit: '5mb' }));

server/controllers/authController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ dotenv.config();
1414

1515
// Generate JWT token function
1616
const generateToken = (user) => {
17-
rewt.sign({ id: user._id }, process.env.JWT_SECRET, {
17+
return jwt.sign({ id: user._id }, process.env.JWT_SECRET, {
1818
expiresIn: "1d",
1919
});
2020
};

server/utils/emailService.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ const EMAIL_CONFIG = {
1313
pass: process.env.EMAIL_PASS,
1414
},
1515
connectionTimeout: 5000,
16+
tls: {
17+
rejectUnauthorized: false
18+
},
1619
};
1720

1821
const RATE_LIMIT = {

0 commit comments

Comments
 (0)