Skip to content

Papermark is the open-source DocSend alternative and secure data rooms with built-in analytics and custom domains.

chore: remove unused route

Marc Seitze25f12357de0
diff --git a/pages/api/auth-plus/set-cookie.ts b/pages/api/auth-plus/set-cookie.ts
deleted file mode 100644
index 1c28b444..00000000
--- a/pages/api/auth-plus/set-cookie.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-import { NextApiRequest, NextApiResponse } from "next";
-
-import { getToken } from "next-auth/jwt";
-
-const VERCEL_DEPLOYMENT = !!process.env.VERCEL_URL;
-
-export default async function handler(
- req: NextApiRequest,
- res: NextApiResponse,
-) {
- const token = await getToken({ req });
-
- if (!token) {
- return res.status(401).end();
- }
-
- // Set the cookie for the other domain
- res.setHeader(
- "Set-Cookie",
- `${VERCEL_DEPLOYMENT ? "__Secure-" : ""}next-auth.session-token=${req.cookies[`${VERCEL_DEPLOYMENT ? "__Secure-" : ""}next-auth.session-token`]}; HttpOnly; Path=/; SameSite=Lax; ${VERCEL_DEPLOYMENT ? "Secure; " : ""}Domain=.papermark.io; Max-Age=${30 * 24 * 60 * 60}`,
- );
-
- res.status(200).end();
-}