Files
calendar/apps/web/pages/api/auth/[...nextauth].ts
T
Amit SharmaandGitHub f5b9b6b0f9 feat: store ads clickid when creating an account (#25763)
* feat: store ads clickid when creating an account

* fix: type check

* fix: google campaignId not being added to stripe

* remove tracking in stripe app
2025-12-22 23:29:51 +05:30

19 lines
591 B
TypeScript

import type { NextApiRequest, NextApiResponse } from "next";
import NextAuth from "next-auth";
import { getOptions } from "@calcom/features/auth/lib/next-auth-options";
import { getTrackingFromCookies } from "@calcom/lib/tracking";
// pass req to NextAuth: https://github.com/nextauthjs/next-auth/discussions/469
const handler = (req: NextApiRequest, res: NextApiResponse) =>
NextAuth(
req,
res,
getOptions({
getDubId: () => req.cookies.dub_id || req.cookies.dclid,
getTrackingData: () => getTrackingFromCookies(req.cookies),
})
);
export default handler;