File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import type { CookieOption , CookiesOptions } from "next-auth" ;
22
3- import { isENVDev } from "@calcom/lib/env" ;
4-
53/**
64 * Copy from 'https://github.com/nextauthjs/next-auth/blob/227ff2259f/src/core/lib/cookie.ts' as we can't import it directly
75 *
@@ -20,12 +18,7 @@ export function defaultCookies(useSecureCookies: boolean): CookiesOptions {
2018 const cookiePrefix = useSecureCookies ? "__Secure-" : "" ;
2119
2220 const defaultOptions : CookieOption [ "options" ] = {
23- domain : isENVDev
24- ? process . env . ORGANIZATIONS_ENABLED
25- ? //FIXME: This is causing login to not work if someone uses anything other .cal.local for testing
26- ".cal.local"
27- : undefined
28- : NEXTAUTH_COOKIE_DOMAIN ,
21+ domain : NEXTAUTH_COOKIE_DOMAIN || undefined ,
2922 // To enable cookies on widgets,
3023 // https://stackoverflow.com/questions/45094712/iframe-not-reading-cookies-in-chrome
3124 // But we need to set it as `lax` in development
You can’t perform that action at this time.
0 commit comments