mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-06 21:34:28 -05:00
15 lines
404 B
TypeScript
15 lines
404 B
TypeScript
import { createCookieSessionStorage } from "@remix-run/node";
|
|
import invariant from "tiny-invariant";
|
|
|
|
invariant(process.env["SESSION_SECRET"]);
|
|
export const authSessionStorage = createCookieSessionStorage({
|
|
cookie: {
|
|
name: "_session",
|
|
sameSite: "lax",
|
|
path: "/",
|
|
httpOnly: true,
|
|
secrets: [process.env["SESSION_SECRET"]],
|
|
secure: process.env.NODE_ENV === "production",
|
|
},
|
|
});
|