Added auth and added doc✔️

This commit is contained in:
Manik Maity
2024-11-08 13:25:21 +05:30
parent 582daa2c3b
commit 59a892d042
4 changed files with 110 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ export async function signinController(req, res) {
try {
const { email, password } = req.body;
const { token, userData } = await signinService(email, password);
res.cookie("access-token", token, {
res.cookie("livepoll-access-token", token, {
httpOnly: true,
maxAge: 10 * 24 * 60 * 60 * 1000, // 10 days
}).status(200).json({