Skip to content

Commit 95e992b

Browse files
committed
Add prefix __Secure to cookie in deployment
1 parent dc73238 commit 95e992b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/routes/(authenticated)/users/+page.server.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,7 @@ export const actions: Actions = {
298298
maxAge: 60 * 60 // 1 hour
299299
});
300300

301-
event.cookies.set('authjs.session-token', newToken!, {
301+
event.cookies.set(`${process.env.APP_ENV ? '__Secure-' : ''}authjs.session-token`, newToken!, {
302302
path: '/',
303303
httpOnly: true,
304304
secure: !!process.env.APP_ENV,

0 commit comments

Comments
 (0)