fix: 🐛 Make cookie apply for the whole site instead of just /auth/

This commit is contained in:
Jack W. 2024-03-04 16:46:01 -05:00
parent 5d3fb29c1f
commit 53c9c5fe58
No known key found for this signature in database

View file

@ -60,7 +60,12 @@ export default function (files: Files) {
assign token
*/
setCookie(ctx, "auth", auth.create(acc.id, 3 * 24 * 60 * 60 * 1000))
setCookie(ctx, "auth", auth.create(acc.id, 3 * 24 * 60 * 60 * 1000), {
path: "/",
sameSite: "Strict",
secure: true,
httpOnly: true
})
return ctx.text("")
})