Scheduling infrastructure for absolutely everyone.
Squashed commit of the following:
zomars3ed206df23cd
diff --git a/apps/api b/apps/apiindex 0f13e80785c..fc87557902a 160000--- a/apps/api+++ b/apps/api@@ -1 +1 @@-Subproject commit 0f13e80785cdb9286b32065cbf9a6ca5d20e746d+Subproject commit fc87557902a85bb7b0ec6f15efa19af12685ff0cdiff --git a/apps/console b/apps/consoleindex fa31167033e..544ded3da46 160000--- a/apps/console+++ b/apps/console@@ -1 +1 @@-Subproject commit fa31167033eaed3b0f78bc21f5b159b7cb4303f4+Subproject commit 544ded3da4649b01ea90b21cddf9830ce62adcb8diff --git a/apps/web/components/eventtype/EventTypeDescription.tsx b/apps/web/components/eventtype/EventTypeDescription.tsxindex aaa8c98324b..4a325fc71a9 100644--- a/apps/web/components/eventtype/EventTypeDescription.tsx+++ b/apps/web/components/eventtype/EventTypeDescription.tsx@@ -32,39 +32,39 @@ export const EventTypeDescription = ({ eventType, className }: EventTypeDescript<><div className={classNames("text-neutral-500 dark:text-white", className)}>{eventType.description && (- <h2 className="max-w-[280px] overflow-hidden text-ellipsis text-sm sm:max-w-[500px]">+ <h2 className="max-w-[280px] overflow-hidden text-ellipsis opacity-60 sm:max-w-[500px]">{eventType.description.substring(0, 100)}{eventType.description.length > 100 && "..."}</h2>)}<ul className="mt-2 flex flex-wrap space-x-1 sm:flex-nowrap ">- <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-gray-800 dark:bg-gray-900 dark:text-white">- <Icon.FiClock className="mr-1.5 inline h-3 w-3" aria-hidden="true" />+ <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">+ <Icon.Clock className="mr-1.5 inline h-3 w-3" aria-hidden="true" />{eventType.length} {t("minutes")}</li>{eventType.schedulingType ? (- <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-gray-800 dark:bg-gray-900 dark:text-white">- <Icon.FiUsers className="mr-1.5 inline h-3 w-3" aria-hidden="true" />+ <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">+ <Icon.Users className="mr-1.5 inline h-3 w-3" aria-hidden="true" />{eventType.schedulingType === SchedulingType.ROUND_ROBIN && t("round_robin")}{eventType.schedulingType === SchedulingType.COLLECTIVE && t("collective")}</li>) : (- <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-gray-800 dark:bg-gray-900 dark:text-white">- <Icon.FiUser className="mr-1.5 inline h-3 w-3" aria-hidden="true" />+ <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">+ <Icon.User className="mr-1.5 inline h-3 w-3" aria-hidden="true" />{t("1_on_1")}</li>)}{recurringEvent?.count && recurringEvent.count > 0 && (- <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-gray-800 dark:bg-gray-900 dark:text-white">- <Icon.FiRefreshCw className="mr-1.5 inline h-3 w-3" aria-hidden="true" />+ <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">+ <Icon.RefreshCw className="mr-1.5 inline h-3 w-3" aria-hidden="true" />{t("repeats_up_to", {count: recurringEvent.count,})}</li>)}{eventType.price > 0 && (- <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-gray-800 dark:bg-gray-900 dark:text-white">- <Icon.FiCreditCard className="mr-1.5 inline h-3 w-3" aria-hidden="true" />+ <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">+ <Icon.CreditCard className="mr-1.5 inline h-3 w-3" aria-hidden="true" /><IntlProvider locale="en"><FormattedNumbervalue={eventType.price / 100.0}@@ -75,8 +75,8 @@ export const EventTypeDescription = ({ eventType, className }: EventTypeDescript</li>)}{eventType.requiresConfirmation && (- <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-gray-800 dark:bg-gray-900 dark:text-white">- <Icon.FiCheckSquare className="mr-1.5 inline h-3 w-3" aria-hidden="true" />+ <li className="mb-1 flex items-center whitespace-nowrap rounded-sm bg-gray-100 px-1 py-px text-xs text-gray-800 dark:bg-gray-900 dark:text-white">+ <Icon.CheckSquare className="mr-1.5 inline h-3 w-3" aria-hidden="true" />{t("requires_confirmation")}</li>)}diff --git a/apps/web/package.json b/apps/web/package.jsonindex 59b25182cc0..5c7b3abd7e0 100644--- a/apps/web/package.json+++ b/apps/web/package.json@@ -81,7 +81,7 @@"micro": "^9.3.4","mime-types": "^2.1.35","next": "^12.2.0",- "next-auth": "^4.9.0",+ "next-auth": "^4.10.3","next-axiom": "^0.10.0","next-collect": "^0.2.0","next-i18next": "^11.0.0",diff --git a/apps/web/pages/api/auth/[...nextauth].tsx b/apps/web/pages/api/auth/[...nextauth].tsxindex a298e94b2f3..be4861284fa 100644--- a/apps/web/pages/api/auth/[...nextauth].tsx+++ b/apps/web/pages/api/auth/[...nextauth].tsx@@ -12,7 +12,7 @@ import path from "path";import checkLicense from "@calcom/features/ee/common/server/checkLicense";import ImpersonationProvider from "@calcom/features/ee/impersonation/lib/ImpersonationProvider";-import { WEBAPP_URL, WEBSITE_URL } from "@calcom/lib/constants";+import { WEBAPP_URL } from "@calcom/lib/constants";import { symmetricDecrypt } from "@calcom/lib/crypto";import { defaultCookies } from "@calcom/lib/default-cookies";import { serverConfig } from "@calcom/lib/serverConfig";@@ -165,6 +165,11 @@ if (true) {maxAge: 10 * 60 * 60, // Magic links are valid for 10 min only// Here we setup the sendVerificationRequest that calls the email template with the identifier (email) and token to verify.sendVerificationRequest: ({ identifier, url }) => {+ const originalUrl = new URL(url);+ const webappUrl = new URL(WEBAPP_URL);+ if (originalUrl.origin !== webappUrl.origin) {+ url = url.replace(originalUrl.origin, webappUrl.origin);+ }const emailFile = readFileSync(path.join(emailsDir, "confirm-email.html"), {encoding: "utf8",});@@ -191,11 +196,12 @@ export default NextAuth({session: {strategy: "jwt",},- cookies: defaultCookies(WEBSITE_URL?.startsWith("https://")),+ cookies: defaultCookies(WEBAPP_URL?.startsWith("https://")),pages: {signIn: "/auth/login",signOut: "/auth/logout",error: "/auth/error", // Error code passed in query string as ?error=+ // verifyRequest: "/auth/verify-request",// newUser: "/auth/new", // New users will be directed here on first sign in (leave the property out if not of interest)},providers,@@ -441,8 +447,8 @@ export default NextAuth({async redirect({ url, baseUrl }) {// Allows relative callback URLsif (url.startsWith("/")) return `${baseUrl}${url}`;- // Allows callback URLs on the same origin- else if (new URL(url).origin === new URL(baseUrl || WEBSITE_URL).origin) return url;+ // Allows callback URLs on the same domain+ else if (new URL(url).hostname === new URL(WEBAPP_URL).hostname) return url;return baseUrl;},},diff --git a/apps/website b/apps/websiteindex 29bdbba2caf..3b90e8b79ca 160000--- a/apps/website+++ b/apps/website@@ -1 +1 @@-Subproject commit 29bdbba2caf96638ad5254de4851bff8229e44b0+Subproject commit 3b90e8b79ca63d0e9ac3492241180088f9a28304diff --git a/yarn.lock b/yarn.lockindex 1f244016dc5..34f8af8b791 100644--- a/yarn.lock+++ b/yarn.lock@@ -6222,11 +6222,16 @@"@types/node" "*"form-data "^3.0.0"-"@types/node@*", "@types/[email protected]", "@types/node@>=12.0.0", "@types/node@>=8.1.0", "@types/node@^12.12.6", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0":+"@types/node@*", "@types/[email protected]", "@types/node@>=12.0.0", "@types/node@>=8.1.0", "@types/node@^14.0.10 || ^16.0.0", "@types/node@^14.14.20 || ^16.0.0":version "16.9.1"resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708"integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==+"@types/node@^12.12.6":+ version "12.20.55"+ resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.55.tgz#c329cbd434c42164f846b909bd6f85b5537f6240"+ integrity sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==+"@types/nodemailer@^6.4.4":version "6.4.4"resolved "https://registry.yarnpkg.com/@types/nodemailer/-/nodemailer-6.4.4.tgz#c265f7e7a51df587597b3a49a023acaf0c741f4b"@@ -17334,10 +17339,10 @@ next-api-middleware@^1.0.1:dependencies:debug "^4.3.2"-next-auth@^4.9.0:- version "4.9.0"- resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.9.0.tgz#0d8cabcb22a976744131a2e68d5f08756f322593"- integrity sha512-/4S5dFeyNg2nXlD7g/Sh5A4WZWnUMDpEf8x/x+gzmAf5cAY2SjDM6sLk9u4XRmsndsxQpIMWDw03sUTAD+Yzog==+next-auth@^4.10.3:+ version "4.10.3"+ resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.10.3.tgz#0a952dd5004fd2ac2ba414c990922cf9b33951a3"+ integrity sha512-7zc4aXYc/EEln7Pkcsn21V1IevaTZsMLJwapfbnKA4+JY0+jFzWbt5p/ljugesGIrN4VOZhpZIw50EaFZyghJQ==dependencies:"@babel/runtime" "^7.16.3""@panva/hkdf" "^1.0.1"