* feat: store ads clickid when creating an account * fix: type check * fix: google campaignId not being added to stripe * remove tracking in stripe app
19 lines
591 B
TypeScript
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;
|