summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/app/api/auth/login/route.tsx2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/app/api/auth/login/route.tsx b/src/app/api/auth/login/route.tsx
index d4da662..29e7f6c 100644
--- a/src/app/api/auth/login/route.tsx
+++ b/src/app/api/auth/login/route.tsx
@@ -30,7 +30,7 @@ export async function POST(request: NextRequest) {
token: jwt.sign(user, JWT_SECRET, { expiresIn: '10y' })
}
- cookies().set('credential', JSON.stringify(credential))
+ cookies().set('credential', JSON.stringify(credential), { secure: true, expires: new Date(Date.now() + 1000 * 60 * 60 * 24 * 30) })
return NextResponse.json(credential)
} \ No newline at end of file