From 3ed206df23cd7febe381c8f56b1984555a9d54db Mon Sep 17 00:00:00 2001 From: zomars Date: Fri, 5 Aug 2022 18:08:05 -0600 Subject: [PATCH] Squashed commit of the following: commit c378c647fe4822071cbdfc577fcfc950e53973df Author: zomars Date: Fri Aug 5 17:36:21 2022 -0600 Cleanup commit a89cc7981df1c2aae96188466833490eb3b227a1 Author: zomars Date: Fri Aug 5 17:17:57 2022 -0600 redirect fixes commit a27979c2b3f06c9956ee9abfef1e82a5558b6411 Author: zomars Date: Fri Aug 5 17:02:33 2022 -0600 Fingers crossed commit c08a09e8d2ba3eb2561f418bb3b0370245f79bf7 Author: zomars Date: Fri Aug 5 16:28:55 2022 -0600 Update [...nextauth].tsx commit 4063bddb2ea3cbf3dda6be6cc10070ecc1eb578c Author: zomars Date: Fri Aug 5 16:05:21 2022 -0600 Submodule sync commit e44dc73a3b751ba4cacc85abfe6680a668393c0d Author: zomars Date: Fri Aug 5 16:05:06 2022 -0600 Upgrade next-auth commit 2b36e0a1b376083739ea06b793f1523e2f158a33 Author: zomars Date: Fri Aug 5 15:23:03 2022 -0600 Magic signup fixes commit 2cc81ca7e2f79a4e3fcab370e23ac29cbe3ee18d Author: Joe Au-Yeung <65426560+joeauyeung@users.noreply.github.com> Date: Thu Aug 4 11:49:51 2022 -0400 Properly parse list calendar call to MS Graph (#3698) commit 65887d8f9db8b399964fce38ec104ed24fcc48e6 Author: Leo Giovanetti Date: Thu Aug 4 12:52:50 2022 -0300 Fix app-store seeding (#3693) (#3697) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: Hariom Balhara Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> commit 71594b962352519c4ed4ee6cf68d16aac9b71e26 Author: Leo Giovanetti Date: Wed Aug 3 16:48:07 2022 -0300 fixed dark mode profile page (#3650) (#3681) * fixed dark mode profile page * nit Co-authored-by: Peer Richelsen commit 78a5ae988274ff05f26309033821acc48e22823d Author: Leo Giovanetti Date: Wed Aug 3 14:05:02 2022 -0300 Potential fix (#3671) (#3676) commit b006240b0c62e9e62944cb7184793f099358e2ec Merge: 6179b3fbe e7418f68a Author: zomars Date: Mon Aug 1 18:20:47 2022 -0600 Merge branch 'main' into production commit 6179b3fbe06709f1cf3a4e54214a7dbb1543765e Author: zomars Date: Mon Aug 1 18:20:40 2022 -0600 Fixes successRedirectUrl validation commit 14443099e0377e8d9af52f53f15c2f8b91b784d2 Author: zomars Date: Mon Aug 1 17:59:47 2022 -0600 successRedirectUrl fixes --- apps/api | 2 +- apps/console | 2 +- .../eventtype/EventTypeDescription.tsx | 26 +++++++++---------- apps/web/package.json | 2 +- apps/web/pages/api/auth/[...nextauth].tsx | 14 +++++++--- apps/website | 2 +- yarn.lock | 15 +++++++---- 7 files changed, 37 insertions(+), 26 deletions(-) diff --git a/apps/api b/apps/api index 0f13e80785..fc87557902 160000 --- a/apps/api +++ b/apps/api @@ -1 +1 @@ -Subproject commit 0f13e80785cdb9286b32065cbf9a6ca5d20e746d +Subproject commit fc87557902a85bb7b0ec6f15efa19af12685ff0c diff --git a/apps/console b/apps/console index fa31167033..544ded3da4 160000 --- a/apps/console +++ b/apps/console @@ -1 +1 @@ -Subproject commit fa31167033eaed3b0f78bc21f5b159b7cb4303f4 +Subproject commit 544ded3da4649b01ea90b21cddf9830ce62adcb8 diff --git a/apps/web/components/eventtype/EventTypeDescription.tsx b/apps/web/components/eventtype/EventTypeDescription.tsx index aaa8c98324..4a325fc71a 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 <>
{eventType.description && ( -

+

{eventType.description.substring(0, 100)} {eventType.description.length > 100 && "..."}

)}
    -
  • -
  • +
  • {eventType.schedulingType ? ( -
  • -
  • +
  • ) : ( -
  • -
  • +
  • )} {recurringEvent?.count && recurringEvent.count > 0 && ( -
  • -
  • +
  • )} {eventType.price > 0 && ( -
  • -
  • +
  • -
  • +
  • )} diff --git a/apps/web/package.json b/apps/web/package.json index 59b25182cc..5c7b3abd7e 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].tsx index a298e94b2f..be4861284f 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 URLs if (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/website index 29bdbba2ca..3b90e8b79c 160000 --- a/apps/website +++ b/apps/website @@ -1 +1 @@ -Subproject commit 29bdbba2caf96638ad5254de4851bff8229e44b0 +Subproject commit 3b90e8b79ca63d0e9ac3492241180088f9a28304 diff --git a/yarn.lock b/yarn.lock index 1f244016dc..34f8af8b79 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6222,11 +6222,16 @@ "@types/node" "*" form-data "^3.0.0" -"@types/node@*", "@types/node@16.9.1", "@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/node@16.9.1", "@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"