import { createCookieSessionStorage } from "remix";
      const sessionSecret = "YOURSESSIONSECRET";
      const { getSession, commitSession, destroySession } =
          // a Cookie from `createCookie` or the CookieOptions to create one
          cookie: {
            name: "__session",
            // all of these are optional
            domain: "domain.tld",
            expires: new Date( + 60),
            httpOnly: true,
            maxAge: 60,
            path: "/",
            sameSite: "lax",
            secrets: [sessionSecret],
            secure: true
      export { getSession, commitSession, destroySession };

      Javascript language logo
      your recipe card header background
      Create Cookie Session

      Remix JavaScript public recipes

      Create a cookie session with remix.

      Shortcut: remix.cookie.session


        Add Comment

        Log in to add a comment

        Codiga - All rights reserved 2022.