This commit is contained in:
Marco Pedone 2025-09-04 11:49:15 +02:00
parent 26e0754b1c
commit 8761c8d5a3

View file

@ -1,7 +1,6 @@
import { TRPCError } from "@trpc/server"; import { TRPCError } from "@trpc/server";
import { deleteCookie, type OptionsType, setCookie } from "cookies-next"; import { deleteCookie, type OptionsType, setCookie } from "cookies-next";
import { add } from "date-fns"; import { add } from "date-fns";
import { env } from "~/env.mjs";
import type { UsersId } from "~/schemas/public/Users"; import type { UsersId } from "~/schemas/public/Users";
import type { Context } from "~/server/api/trpc"; import type { Context } from "~/server/api/trpc";
import { import {
@ -29,7 +28,7 @@ const cookieOptions: OptionsType = {
httpOnly: true, httpOnly: true,
path: "/", path: "/",
sameSite: "lax", sameSite: "lax",
secure: env.NODE_ENV === "production", //secure: env.NODE_ENV === "production",
}; };
const accessTokenExpiry = "1m"; const accessTokenExpiry = "1m";