Align scheduler secure auth cookies
This commit is contained in:
@@ -1,14 +1,21 @@
|
||||
import { getOptions } from "@calcom/features/auth/lib/next-auth-options";
|
||||
import { defaultCookies } from "@calcom/lib/default-cookies";
|
||||
import type { TrackingData } from "@calcom/lib/tracking";
|
||||
import NextAuth from "next-auth";
|
||||
|
||||
export const dynamic = "force-dynamic";
|
||||
|
||||
const nextAuthUrl = process.env.NEXTAUTH_URL || process.env.NEXT_PUBLIC_WEBAPP_URL || "";
|
||||
const options = getOptions({
|
||||
getDubId: () => undefined,
|
||||
getTrackingData: (): TrackingData => ({}),
|
||||
});
|
||||
|
||||
const handler = NextAuth(
|
||||
getOptions({
|
||||
getDubId: () => undefined,
|
||||
getTrackingData: (): TrackingData => ({}),
|
||||
})
|
||||
{
|
||||
...options,
|
||||
cookies: defaultCookies(nextAuthUrl.startsWith("https://")),
|
||||
}
|
||||
);
|
||||
|
||||
export { handler as GET, handler as POST };
|
||||
|
||||
@@ -38,6 +38,7 @@ services:
|
||||
NODE_ENV: production
|
||||
NEXTAUTH_SECRET: ${NEXTAUTH_SECRET}
|
||||
NEXTAUTH_URL: ${NEXTAUTH_URL:-https://cal.internal.vyntehome.com}
|
||||
NEXT_PUBLIC_WEBAPP_URL: ${NEXT_PUBLIC_WEBAPP_URL:-https://cal.internal.vyntehome.com}
|
||||
NEXTAUTH_COOKIE_DOMAIN: ${NEXTAUTH_COOKIE_DOMAIN:-}
|
||||
AUTHENTIK_ISSUER: ${AUTHENTIK_ISSUER}
|
||||
AUTHENTIK_CLIENT_ID: ${AUTHENTIK_CLIENT_ID}
|
||||
|
||||
Reference in New Issue
Block a user