diff --git a/.env.example b/.env.example
index 39d1ca8e..9577aaa8 100644
--- a/.env.example
+++ b/.env.example
@@ -48,10 +48,13 @@ PGSSLMODE=
# - NEXTAUTH
# @see: https://github.com/calendso/calendso/issues/263
-# Required for Vercel hosting - set NEXTAUTH_URL to equal your BASE_URL
+# @see: https://next-auth.js.org/configuration/options#nextauth_url
+# Required for Vercel hosting - set NEXTAUTH_URL to equal your NEXT_PUBLIC_WEBAPP_URL
# NEXTAUTH_URL='http://localhost:3000'
NEXTAUTH_URL=
-JWT_SECRET='secret'
+# @see: https://next-auth.js.org/configuration/options#nextauth_secret
+# You can use: `openssl rand -base64 32` to generate one
+NEXTAUTH_SECRET=
# Used for cross-domain cookie authentication
NEXTAUTH_COOKIE_DOMAIN=.example.com
diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml
index be1360f6..9ce93de3 100644
--- a/.github/workflows/e2e.yml
+++ b/.github/workflows/e2e.yml
@@ -19,7 +19,8 @@ jobs:
DATABASE_URL: postgresql://postgres:@localhost:5432/calendso
NEXT_PUBLIC_WEBAPP_URL: http://localhost:3000
NEXT_PUBLIC_WEBSITE_URL: http://localhost:3000
- JWT_SECRET: secret
+ JWT_SECRET: secret # TODO: remove once PR#2122 is merged
+ NEXTAUTH_SECRET: secret
GOOGLE_API_CREDENTIALS: ${{ secrets.CI_GOOGLE_API_CREDENTIALS }}
GOOGLE_LOGIN_ENABLED: true
# CRON_API_KEY: xxx
diff --git a/app.json b/app.json
index 65bdd681..75190ec8 100644
--- a/app.json
+++ b/app.json
@@ -18,7 +18,7 @@
"description": "Application Key for symmetric encryption and decryption. Must be 32 bytes for AES256 encryption algorithm.",
"value": "secret"
},
- "JWT_SECRET": "secret"
+ "NEXTAUTH_SECRET": "secret"
},
"scripts": {
"postdeploy": "cd packages/prisma && npx prisma migrate deploy"
diff --git a/apps/admin b/apps/admin
index 58a375b6..943cd10d 160000
--- a/apps/admin
+++ b/apps/admin
@@ -1 +1 @@
-Subproject commit 58a375b6fc9b14ad391466d2aac97e84a713ff0d
+Subproject commit 943cd10de1f6661273d2ec18acdaa93118852714
diff --git a/apps/api b/apps/api
index f9b7cebe..9239b272 160000
--- a/apps/api
+++ b/apps/api
@@ -1 +1 @@
-Subproject commit f9b7cebe3753409c69474b3cd45313ec2468c690
+Subproject commit 9239b27216d04f60870186b69c5e1bb1642d5d44
diff --git a/apps/web/components/Shell.tsx b/apps/web/components/Shell.tsx
index b0e7a75d..aba57193 100644
--- a/apps/web/components/Shell.tsx
+++ b/apps/web/components/Shell.tsx
@@ -69,7 +69,7 @@ function useRedirectToLoginIfUnauthenticated(isPublic = false) {
router.replace({
pathname: "/auth/login",
query: {
- callbackUrl: `${WEBAPP_URL}/${location.pathname}${location.search}`,
+ callbackUrl: `${WEBAPP_URL}${location.pathname}${location.search}`,
},
});
}
diff --git a/apps/web/lib/emails/templates/attendee-scheduled-email.ts b/apps/web/lib/emails/templates/attendee-scheduled-email.ts
index 22730dc0..96586c67 100644
--- a/apps/web/lib/emails/templates/attendee-scheduled-email.ts
+++ b/apps/web/lib/emails/templates/attendee-scheduled-email.ts
@@ -9,10 +9,9 @@ import nodemailer from "nodemailer";
import { getAppName } from "@calcom/app-store/utils";
import { getCancelLink, getRichDescription } from "@calcom/lib/CalEventParser";
import { getErrorFromUnknown } from "@calcom/lib/errors";
+import { serverConfig } from "@calcom/lib/serverConfig";
import type { Person, CalendarEvent } from "@calcom/types/Calendar";
-import { serverConfig } from "@lib/serverConfig";
-
import {
emailHead,
emailSchedulingBodyHeader,
diff --git a/apps/web/lib/emails/templates/confirm-email.html b/apps/web/lib/emails/templates/confirm-email.html
new file mode 100644
index 00000000..dc8336e8
--- /dev/null
+++ b/apps/web/lib/emails/templates/confirm-email.html
@@ -0,0 +1,573 @@
+
+
+
+
+ ${headerContent}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ |
+
+
+
+ |
+
+
+
+
+
+ |
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Click the button below to log in to Cal.com
+ This link will expire in 10 minutes.
+
+
+
+
+ Confirming this request will securely log you in using
+ {{email}}.
+
+ Enjoy your new scheduling soultion by, The Cal.com Team
+
+
+
+
+
+ If you’re having trouble with the button above,
+ copy and paste the URL below into your web
+ browser.
+
+ {{signin_url}}
+ |
+
+
+
+ |
+
+
+ |
+
+
+
+
+ |
+
+
+ |
+
+
+
+
\ No newline at end of file
diff --git a/apps/web/lib/emails/templates/forgot-password-email.ts b/apps/web/lib/emails/templates/forgot-password-email.ts
index f7ba982f..45cc19d9 100644
--- a/apps/web/lib/emails/templates/forgot-password-email.ts
+++ b/apps/web/lib/emails/templates/forgot-password-email.ts
@@ -2,8 +2,7 @@ import { TFunction } from "next-i18next";
import nodemailer from "nodemailer";
import { getErrorFromUnknown } from "@calcom/lib/errors";
-
-import { serverConfig } from "@lib/serverConfig";
+import { serverConfig } from "@calcom/lib/serverConfig";
import { emailHead, linkIcon, emailBodyLogo } from "./common";
diff --git a/apps/web/lib/emails/templates/organizer-scheduled-email.ts b/apps/web/lib/emails/templates/organizer-scheduled-email.ts
index 35828360..d16e5462 100644
--- a/apps/web/lib/emails/templates/organizer-scheduled-email.ts
+++ b/apps/web/lib/emails/templates/organizer-scheduled-email.ts
@@ -9,10 +9,9 @@ import nodemailer from "nodemailer";
import { getAppName } from "@calcom/app-store/utils";
import { getCancelLink, getRichDescription } from "@calcom/lib/CalEventParser";
import { getErrorFromUnknown } from "@calcom/lib/errors";
+import { serverConfig } from "@calcom/lib/serverConfig";
import type { CalendarEvent } from "@calcom/types/Calendar";
-import { serverConfig } from "@lib/serverConfig";
-
import {
emailHead,
emailSchedulingBodyHeader,
diff --git a/apps/web/lib/emails/templates/team-invite-email.ts b/apps/web/lib/emails/templates/team-invite-email.ts
index bf08e277..7d9d91ae 100644
--- a/apps/web/lib/emails/templates/team-invite-email.ts
+++ b/apps/web/lib/emails/templates/team-invite-email.ts
@@ -2,8 +2,7 @@ import { TFunction } from "next-i18next";
import nodemailer from "nodemailer";
import { getErrorFromUnknown } from "@calcom/lib/errors";
-
-import { serverConfig } from "@lib/serverConfig";
+import { serverConfig } from "@calcom/lib/serverConfig";
import { emailHead, linkIcon, emailBodyLogo } from "./common";
diff --git a/apps/web/package.json b/apps/web/package.json
index 39f277d4..a144b4d9 100644
--- a/apps/web/package.json
+++ b/apps/web/package.json
@@ -37,11 +37,12 @@
"@calcom/ui": "*",
"@daily-co/daily-js": "^0.21.0",
"@glidejs/glide": "^3.5.2",
- "@heroicons/react": "^1.0.5",
+ "@heroicons/react": "^1.0.6",
"@hookform/error-message": "^2.0.0",
"@hookform/resolvers": "^2.8.5",
"@jitsu/sdk-js": "^2.2.4",
"@metamask/providers": "^8.1.1",
+ "@next-auth/prisma-adapter": "^1.0.3",
"@next/bundle-analyzer": "12.1.0",
"@radix-ui/react-avatar": "^0.1.0",
"@radix-ui/react-collapsible": "^0.1.0",
@@ -76,7 +77,7 @@
"micro": "^9.3.4",
"mime-types": "^2.1.35",
"next": "^12.1.0",
- "next-auth": "^4.0.6",
+ "next-auth": "^4.3.3",
"next-i18next": "^8.9.0",
"next-mdx-remote": "^4.0.2",
"next-seo": "^4.26.0",
diff --git a/apps/web/pages/api/auth/[...nextauth].tsx b/apps/web/pages/api/auth/[...nextauth].tsx
index 33dd7787..2831fff4 100644
--- a/apps/web/pages/api/auth/[...nextauth].tsx
+++ b/apps/web/pages/api/auth/[...nextauth].tsx
@@ -1,20 +1,33 @@
+import { PrismaAdapter } from "@next-auth/prisma-adapter";
import { IdentityProvider } from "@prisma/client";
+import { readFileSync } from "fs";
+import Handlebars from "handlebars";
import NextAuth, { Session } from "next-auth";
import { Provider } from "next-auth/providers";
import CredentialsProvider from "next-auth/providers/credentials";
+import EmailProvider from "next-auth/providers/email";
import GoogleProvider from "next-auth/providers/google";
+import nodemailer, { TransportOptions } from "nodemailer";
import { authenticator } from "otplib";
+import path from "path";
+import { WEBSITE_URL } from "@calcom/lib/constants";
import { symmetricDecrypt } from "@calcom/lib/crypto";
+import { defaultCookies } from "@calcom/lib/default-cookies";
+import { serverConfig } from "@calcom/lib/serverConfig";
import { ErrorCode, verifyPassword } from "@lib/auth";
import prisma from "@lib/prisma";
import { randomString } from "@lib/random";
-import { isSAMLLoginEnabled, samlLoginUrl, hostedCal } from "@lib/saml";
+import { hostedCal, isSAMLLoginEnabled, samlLoginUrl } from "@lib/saml";
import slugify from "@lib/slugify";
import { GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, IS_GOOGLE_LOGIN_ENABLED } from "@server/lib/constants";
+const transporter = nodemailer.createTransport({
+ ...(serverConfig.transport as TransportOptions),
+} as TransportOptions);
+
const usernameSlug = (username: string) => slugify(username) + "-" + randomString(6).toLowerCase();
const providers: Provider[] = [
@@ -141,15 +154,50 @@ if (isSAMLLoginEnabled) {
});
}
+if (true) {
+ const emailsDir = path.resolve(process.cwd(), "lib", "emails", "templates");
+ providers.push(
+ EmailProvider({
+ 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 }) => {
+ // Here we add /new endpoint to the callback URL by adding it before &token=.
+ // This is not elegant but it works. We should probably use a different approach when we can.
+ url = url.includes("/auth/new") ? url : url.replace("&token", "/auth/new&token");
+ const emailFile = readFileSync(path.join(emailsDir, "confirm-email.html"), {
+ encoding: "utf8",
+ });
+ const emailTemplate = Handlebars.compile(emailFile);
+ transporter.sendMail({
+ from: `${process.env.EMAIL_FROM}` || "Cal.com",
+ to: identifier,
+ subject: "Your sign-in link for Cal.com",
+ html: emailTemplate({
+ base_url: WEBSITE_URL,
+ signin_url: url,
+ email: identifier,
+ }),
+ });
+ },
+ })
+ );
+}
+
export default NextAuth({
+ adapter: PrismaAdapter(prisma),
session: {
strategy: "jwt",
},
- secret: process.env.JWT_SECRET,
+ /** @deprecated remove once PR#2122 is merged */
+ jwt: {
+ secret: process.env.JWT_SECRET || process.env.NEXTAUTH_SECRET,
+ },
+ cookies: defaultCookies(WEBSITE_URL?.startsWith("https://")),
pages: {
signIn: "/auth/login",
signOut: "/auth/logout",
error: "/auth/error", // Error code passed in query string as ?error=
+ newUser: "/auth/new", // New users will be directed here on first sign in (leave the property out if not of interest)
},
providers,
callbacks: {
@@ -235,7 +283,11 @@ export default NextAuth({
};
return calendsoSession;
},
- async signIn({ user, account, profile }) {
+ async signIn(params) {
+ const { user, account, profile } = params;
+ if (account.provider === "email") {
+ return true;
+ }
// In this case we've already verified the credentials in the authorize
// callback so we can sign the user in.
if (account.type === "credentials") {
diff --git a/apps/web/pages/api/teams/[team]/invite.ts b/apps/web/pages/api/teams/[team]/invite.ts
index f37a5f79..1dc8ab4f 100644
--- a/apps/web/pages/api/teams/[team]/invite.ts
+++ b/apps/web/pages/api/teams/[team]/invite.ts
@@ -76,7 +76,7 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
const token: string = randomBytes(32).toString("hex");
- await prisma.verificationRequest.create({
+ await prisma.verificationToken.create({
data: {
identifier: usernameOrEmail,
token,
diff --git a/apps/web/pages/auth/new.tsx b/apps/web/pages/auth/new.tsx
new file mode 100644
index 00000000..ea4eb236
--- /dev/null
+++ b/apps/web/pages/auth/new.tsx
@@ -0,0 +1,6 @@
+export default function NewUserPage() {
+ if (typeof window !== "undefined") {
+ window.location.assign(process.env.NEXT_PUBLIC_WEBAPP_URL || "https://app.cal.com");
+ }
+ return null;
+}
diff --git a/apps/web/pages/auth/signup.tsx b/apps/web/pages/auth/signup.tsx
index 57adc51c..10bffc48 100644
--- a/apps/web/pages/auth/signup.tsx
+++ b/apps/web/pages/auth/signup.tsx
@@ -153,14 +153,14 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
notFound: true,
};
}
- const verificationRequest = await prisma.verificationRequest.findUnique({
+ const verificationToken = await prisma.verificationToken.findUnique({
where: {
token,
},
});
- // for now, disable if no verificationRequestToken given or token expired
- if (!verificationRequest || verificationRequest.expires < new Date()) {
+ // for now, disable if no verificationToken given or token expired
+ if (!verificationToken || verificationToken.expires < new Date()) {
return {
notFound: true,
};
@@ -170,7 +170,7 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
where: {
AND: [
{
- email: verificationRequest.identifier,
+ email: verificationToken.identifier,
},
{
emailVerified: {
@@ -194,7 +194,7 @@ export const getServerSideProps = async (ctx: GetServerSidePropsContext) => {
props: {
isGoogleLoginEnabled: IS_GOOGLE_LOGIN_ENABLED,
isSAMLLoginEnabled,
- email: verificationRequest.identifier,
+ email: verificationToken.identifier,
trpcState: ssr.dehydrate(),
},
};
diff --git a/apps/web/playwright/auth/auth-index.test.ts b/apps/web/playwright/auth/auth-index.test.ts
index 3303295e..cd96a0c1 100644
--- a/apps/web/playwright/auth/auth-index.test.ts
+++ b/apps/web/playwright/auth/auth-index.test.ts
@@ -35,7 +35,7 @@ test.describe("Can signup from a team invite", async () => {
// Wait for the invite to be sent
await page.waitForSelector(`[data-testid="member-email"][data-email="${testUser.email}"]`);
- const tokenObj = await prisma.verificationRequest.findFirst({
+ const tokenObj = await prisma.verificationToken.findFirst({
where: { identifier: testUser.email },
select: { token: true },
});
@@ -49,7 +49,7 @@ test.describe("Can signup from a team invite", async () => {
where: { email: testUser.email },
});
// Delete verification request
- await prisma.verificationRequest.delete({
+ await prisma.verificationToken.delete({
where: { token },
});
});
diff --git a/apps/web/server/routers/viewer/teams.tsx b/apps/web/server/routers/viewer/teams.tsx
index 3c2bb278..001c9cb0 100644
--- a/apps/web/server/routers/viewer/teams.tsx
+++ b/apps/web/server/routers/viewer/teams.tsx
@@ -247,7 +247,7 @@ export const viewerTeamsRouter = createProtectedRouter()
const token: string = randomBytes(32).toString("hex");
- await ctx.prisma.verificationRequest.create({
+ await ctx.prisma.verificationToken.create({
data: {
identifier: input.usernameOrEmail,
token,
diff --git a/packages/app-store/stripepayment/api/add.ts b/packages/app-store/stripepayment/api/add.ts
index afe4ad54..c6124da6 100644
--- a/packages/app-store/stripepayment/api/add.ts
+++ b/packages/app-store/stripepayment/api/add.ts
@@ -26,6 +26,8 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
response_type: "code",
"stripe_user[email]": user?.email,
"stripe_user[first_name]": user?.name,
+ /** We need this so E2E don't fail for international users */
+ "stripe_user[country]": process.env.NEXT_PUBLIC_IS_E2E ? "US" : undefined,
redirect_uri,
};
const query = stringify(stripeConnectParams);
diff --git a/packages/lib/default-cookies.ts b/packages/lib/default-cookies.ts
new file mode 100644
index 00000000..1da150c4
--- /dev/null
+++ b/packages/lib/default-cookies.ts
@@ -0,0 +1,64 @@
+import { CookiesOptions } from "next-auth";
+
+import { isENVDev } from "@calcom/lib/env";
+
+/**
+ * Copy from 'https://github.com/nextauthjs/next-auth/blob/227ff2259f/src/core/lib/cookie.ts' as we can't import it directly
+ *
+ * Use secure cookies if the site uses HTTPS
+ * This being conditional allows cookies to work non-HTTPS development URLs
+ * Honour secure cookie option, which sets 'secure' and also adds '__Secure-'
+ * prefix, but enable them by default if the site URL is HTTPS; but not for
+ * non-HTTPS URLs like http://localhost which are used in development).
+ * For more on prefixes see https://googlechrome.github.io/samples/cookie-prefixes/
+ *
+ */
+
+const NEXTAUTH_COOKIE_DOMAIN = process.env.NEXTAUTH_COOKIE_DOMAIN || "";
+export function defaultCookies(useSecureCookies: boolean): CookiesOptions {
+ const cookiePrefix = useSecureCookies ? "__Secure-" : "";
+
+ const defaultOptions = {
+ domain: isENVDev ? undefined : NEXTAUTH_COOKIE_DOMAIN,
+ // To enable cookies on widgets,
+ // https://stackoverflow.com/questions/45094712/iframe-not-reading-cookies-in-chrome
+ // But we need to set it as `lax` in development
+ sameSite: useSecureCookies ? "none" : "lax",
+ path: "/",
+ secure: useSecureCookies,
+ };
+ return {
+ sessionToken: {
+ name: `${cookiePrefix}next-auth.session-token`,
+ options: {
+ ...defaultOptions,
+ httpOnly: true,
+ },
+ },
+ callbackUrl: {
+ name: `${cookiePrefix}next-auth.callback-url`,
+ options: defaultOptions,
+ },
+ csrfToken: {
+ name: `${cookiePrefix}next-auth.csrf-token`,
+ options: {
+ ...defaultOptions,
+ httpOnly: true,
+ },
+ },
+ pkceCodeVerifier: {
+ name: `${cookiePrefix}next-auth.pkce.code_verifier`,
+ options: {
+ ...defaultOptions,
+ httpOnly: true,
+ },
+ },
+ state: {
+ name: `${cookiePrefix}next-auth.state`,
+ options: {
+ ...defaultOptions,
+ httpOnly: true,
+ },
+ },
+ };
+}
diff --git a/packages/lib/env.ts b/packages/lib/env.ts
new file mode 100644
index 00000000..0d120e66
--- /dev/null
+++ b/packages/lib/env.ts
@@ -0,0 +1,2 @@
+export const isENVProd = process.env.NODE_ENV === "production";
+export const isENVDev = process.env.NODE_ENV === "development";
diff --git a/apps/web/lib/serverConfig.ts b/packages/lib/serverConfig.ts
similarity index 87%
rename from apps/web/lib/serverConfig.ts
rename to packages/lib/serverConfig.ts
index a51d0c7e..d492f277 100644
--- a/apps/web/lib/serverConfig.ts
+++ b/packages/lib/serverConfig.ts
@@ -1,6 +1,8 @@
import SendmailTransport from "nodemailer/lib/sendmail-transport";
import SMTPConnection from "nodemailer/lib/smtp-connection";
+import { isENVDev } from "@calcom/lib/env";
+
function detectTransport(): SendmailTransport.Options | SMTPConnection.Options | string {
if (process.env.EMAIL_SERVER) {
return process.env.EMAIL_SERVER;
@@ -16,6 +18,9 @@ function detectTransport(): SendmailTransport.Options | SMTPConnection.Options |
pass: process.env.EMAIL_SERVER_PASSWORD,
},
secure: port === 465,
+ tls: {
+ rejectUnauthorized: isENVDev ? false : true,
+ },
};
return transport;
diff --git a/packages/prisma/migrations/20220306010113_renames_verification_request_to_verification_token/migration.sql b/packages/prisma/migrations/20220306010113_renames_verification_request_to_verification_token/migration.sql
new file mode 100644
index 00000000..26bd8c0f
--- /dev/null
+++ b/packages/prisma/migrations/20220306010113_renames_verification_request_to_verification_token/migration.sql
@@ -0,0 +1,10 @@
+ALTER TABLE IF EXISTS "VerificationRequest" RENAME TO "VerificationToken";
+
+-- RenameIndex
+ALTER INDEX IF EXISTS "VerificationRequest_pkey" RENAME TO "VerificationToken_pkey";
+
+-- RenameIndex
+ALTER INDEX IF EXISTS "VerificationRequest_token_key" RENAME TO "VerificationToken_token_key";
+
+-- RenameIndex
+ALTER INDEX IF EXISTS "VerificationRequest_identifier_token_key" RENAME TO "VerificationToken_identifier_token_key";
diff --git a/packages/prisma/migrations/20220420230104_update_booking_id_constrain/migration.sql b/packages/prisma/migrations/20220420230104_update_booking_id_constrain/migration.sql
new file mode 100644
index 00000000..a7d2ba28
--- /dev/null
+++ b/packages/prisma/migrations/20220420230104_update_booking_id_constrain/migration.sql
@@ -0,0 +1,5 @@
+-- DropForeignKey
+ALTER TABLE "BookingReference" DROP CONSTRAINT "BookingReference_bookingId_fkey";
+
+-- AddForeignKey
+ALTER TABLE "BookingReference" ADD CONSTRAINT "BookingReference_bookingId_fkey" FOREIGN KEY ("bookingId") REFERENCES "Booking"("id") ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/packages/prisma/migrations/20220420230105_rename_verification_token_unique_id/migration.sql b/packages/prisma/migrations/20220420230105_rename_verification_token_unique_id/migration.sql
new file mode 100644
index 00000000..01c27839
--- /dev/null
+++ b/packages/prisma/migrations/20220420230105_rename_verification_token_unique_id/migration.sql
@@ -0,0 +1,5 @@
+-- RenameIndex
+ALTER INDEX IF EXISTS "VerificationRequest.identifier_token_unique" RENAME TO "VerificationToken_identifier_token_key";
+
+-- RenameIndex
+ALTER INDEX IF EXISTS "VerificationRequest.token_unique" RENAME TO "VerificationToken_token_key";
diff --git a/packages/prisma/package.json b/packages/prisma/package.json
index d5ce8af9..7bbc4994 100644
--- a/packages/prisma/package.json
+++ b/packages/prisma/package.json
@@ -27,7 +27,7 @@
},
"dependencies": {
"@calcom/lib": "*",
- "@prisma/client": "3.10.0"
+ "@prisma/client": "^3.12.0"
},
"main": "index.ts",
"types": "index.d.ts",
diff --git a/packages/prisma/schema.prisma b/packages/prisma/schema.prisma
index bfd8bb52..dfc4090f 100644
--- a/packages/prisma/schema.prisma
+++ b/packages/prisma/schema.prisma
@@ -188,7 +188,7 @@ model Membership {
@@id([userId, teamId])
}
-model VerificationRequest {
+model VerificationToken {
id Int @id @default(autoincrement())
identifier String
token String @unique
diff --git a/packages/types/environment.d.ts b/packages/types/environment.d.ts
index 2182c00f..1156cec4 100644
--- a/packages/types/environment.d.ts
+++ b/packages/types/environment.d.ts
@@ -19,7 +19,7 @@ declare namespace NodeJS {
readonly NEXT_PUBLIC_BASE_URL: string | undefined;
/** @deprecated use `NEXT_PUBLIC_WEBSITE_URL` */
readonly NEXT_PUBLIC_APP_URL: string | undefined;
- readonly JWT_SECRET: string | undefined;
+ readonly NEXTAUTH_SECRET: string | undefined;
readonly NEXT_PUBLIC_TELEMETRY_KEY: string | undefined;
readonly MS_GRAPH_CLIENT_ID: string | undefined;
readonly MS_GRAPH_CLIENT_SECRET: string | undefined;
diff --git a/turbo.json b/turbo.json
index 8943f387..30ed195b 100644
--- a/turbo.json
+++ b/turbo.json
@@ -34,7 +34,7 @@
"$EMAIL_SERVER_USER",
"$GOOGLE_API_CREDENTIALS",
"$GOOGLE_LOGIN_ENABLED",
- "$JWT_SECRET",
+ "$NEXTAUTH_SECRET",
"$MS_GRAPH_CLIENT_ID",
"$MS_GRAPH_CLIENT_SECRET",
"$NEXT_PUBLIC_HELPSCOUT_KEY",
@@ -52,6 +52,7 @@
"$NEXT_PUBLIC_ZENDESK_KEY",
"$NEXTAUTH_COOKIE_DOMAIN",
"$NEXTAUTH_URL",
+ "$NEXTAUTH_COOKIE_DOMAIN",
"$PAYMENT_FEE_FIXED",
"$PAYMENT_FEE_PERCENTAGE",
"$PGSSLMODE",
@@ -76,6 +77,7 @@
},
"@calcom/website#build": {
"dependsOn": [
+ "$NEXT_PUBLIC_INTERCOM_APP_ID",
"$NEXT_PUBLIC_STRIPE_FREE_PLAN_PRICE",
"$NEXT_PUBLIC_STRIPE_PREMIUM_PLAN_PRICE",
"$NEXT_PUBLIC_STRIPE_PRO_PLAN_PRICE",
@@ -83,6 +85,9 @@
"$NEXT_PUBLIC_STRIPE_PUBLIC_KEY",
"$NEXT_PUBLIC_WEBAPP_URL",
"$NEXT_PUBLIC_WEBSITE_URL",
+ "$NEXTAUTH_COOKIE_DOMAIN",
+ "$SECRET",
+ "$STRIPE_PRIVATE_KEY",
"$STRIPE_WEBHOOK_SECRET"
],
"outputs": [".next/**"]
diff --git a/yarn.lock b/yarn.lock
index 089b7df3..2bd1058c 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1337,7 +1337,7 @@
resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46"
integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA==
-"@eslint/eslintrc@^1.2.1":
+"@eslint/eslintrc@^1.2.0", "@eslint/eslintrc@^1.2.1":
version "1.2.1"
resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.1.tgz#8b5e1c49f4077235516bc9ec7d41378c0f69b8c6"
integrity sha512-bxvbYnBPN1Gibwyp6NrpnFzA3YtRL3BBAyEAFVIpNTm2Rn4Vy87GA5M4aSn3InRrlsbX5N0GW7XIx+U4SAEKdQ==
@@ -1619,12 +1619,12 @@
resolved "https://registry.yarnpkg.com/@glidejs/glide/-/glide-3.5.2.tgz#7012c5920ecf202bbda44d8526fc979984b6dd54"
integrity sha512-7jGciNJ2bQ4eZLSNlSZ+VAyW63kALf420CvkEpK4lEsUfWJq9odqimci0YCiyNyMUFB+pWHwLYyNc57dijYsCg==
-"@headlessui/react@^1.4.1":
+"@headlessui/react@^1.4.1", "@headlessui/react@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@headlessui/react/-/react-1.5.0.tgz#483b44ba2c8b8d4391e1d2c863898d7dd0cc0296"
integrity sha512-aaRnYxBb3MU2FNJf3Ut9RMTUqqU3as0aI1lQhgo2n9Fa67wRu14iOGqx93xB+uMNVfNwZ5B3y/Ndm7qZGuFeMQ==
-"@heroicons/react@^1.0.4", "@heroicons/react@^1.0.5":
+"@heroicons/react@^1.0.6":
version "1.0.6"
resolved "https://registry.yarnpkg.com/@heroicons/react/-/react-1.0.6.tgz#35dd26987228b39ef2316db3b1245c42eb19e324"
integrity sha512-JJCXydOFWMDpCP4q13iEplA503MQO3xLoZiKum+955ZCtHINWnx26CUxVxxFQu/uLb4LW3ge15ZpzIkXKkJ8oQ==
@@ -2422,6 +2422,11 @@
resolved "https://registry.yarnpkg.com/@microsoft/microsoft-graph-types-beta/-/microsoft-graph-types-beta-0.15.0-preview.tgz#fed0a99be4e1151d566cf063f024913fb48640cd"
integrity sha512-M0zC4t3pmkDz7Qsjx/iZcS+zRuckzsbHESvT9qjLFv64RUgkRmDdmhcvPMiUqUzw/h3YxfYAq9MU+XWjROk/dg==
+"@next-auth/prisma-adapter@^1.0.3":
+ version "1.0.3"
+ resolved "https://registry.yarnpkg.com/@next-auth/prisma-adapter/-/prisma-adapter-1.0.3.tgz#cd6b866a3e281370ce64aa67daf320322a42a2b9"
+ integrity sha512-3Lq1cD3ytKM3EGKJZ4UZvlqshLtlPvYxLeCrUV9ifYwYlq51kmDaHjsIawlp8EbH5pE1UhlsvtlXMery7RghtA==
+
"@next/bundle-analyzer@12.1.0":
version "12.1.0"
resolved "https://registry.yarnpkg.com/@next/bundle-analyzer/-/bundle-analyzer-12.1.0.tgz#9f6d6cda2a26220c936805be407243e22790f4b7"
@@ -2429,6 +2434,11 @@
dependencies:
webpack-bundle-analyzer "4.3.0"
+"@next/env@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.0.tgz#73713399399b34aa5a01771fb73272b55b22c314"
+ integrity sha512-nrIgY6t17FQ9xxwH3jj0a6EOiQ/WDHUos35Hghtr+SWN/ntHIQ7UpuvSi0vaLzZVHQWaDupKI+liO5vANcDeTQ==
+
"@next/env@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/env/-/env-12.1.4.tgz#5af629b43075281ecd7f87938802b7cf5b67e94b"
@@ -2456,6 +2466,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-android-arm-eabi/-/swc-android-arm-eabi-12.1.5.tgz#36729ab3dfd7743e82cfe536b43254dcb146620c"
integrity sha512-SKnGTdYcoN04Y2DvE0/Y7/MjkA+ltsmbuH/y/hR7Ob7tsj+8ZdOYuk+YvW1B8dY20nDPHP58XgDTSm2nA8BzzA==
+"@next/swc-android-arm64@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.1.0.tgz#865ba3a9afc204ff2bdeea49dd64d58705007a39"
+ integrity sha512-/280MLdZe0W03stA69iL+v6I+J1ascrQ6FrXBlXGCsGzrfMaGr7fskMa0T5AhQIVQD4nA/46QQWxG//DYuFBcA==
+
"@next/swc-android-arm64@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.1.4.tgz#f320d60639e19ecffa1f9034829f2d95502a9a51"
@@ -2466,6 +2481,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-android-arm64/-/swc-android-arm64-12.1.5.tgz#52578f552305c92d0b9b81d603c9643fb71e0835"
integrity sha512-YXiqgQ/9Rxg1dXp6brXbeQM1JDx9SwUY/36JiE+36FXqYEmDYbxld9qkX6GEzkc5rbwJ+RCitargnzEtwGW0mw==
+"@next/swc-darwin-arm64@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.0.tgz#08e8b411b8accd095009ed12efbc2f1d4d547135"
+ integrity sha512-R8vcXE2/iONJ1Unf5Ptqjk6LRW3bggH+8drNkkzH4FLEQkHtELhvcmJwkXcuipyQCsIakldAXhRbZmm3YN1vXg==
+
"@next/swc-darwin-arm64@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.4.tgz#fd578278312613eddcf3aee26910100509941b63"
@@ -2476,6 +2496,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-darwin-arm64/-/swc-darwin-arm64-12.1.5.tgz#3d5b53211484c72074f4975ba0ec2b1107db300e"
integrity sha512-y8mhldb/WFZ6lFeowkGfi0cO/lBdiBqDk4T4LZLvCpoQp4Or/NzUN6P5NzBQZ5/b4oUHM/wQICEM+1wKA4qIVw==
+"@next/swc-darwin-x64@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.0.tgz#fcd684497a76e8feaca88db3c394480ff0b007cd"
+ integrity sha512-ieAz0/J0PhmbZBB8+EA/JGdhRHBogF8BWaeqR7hwveb6SYEIJaDNQy0I+ZN8gF8hLj63bEDxJAs/cEhdnTq+ug==
+
"@next/swc-darwin-x64@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.4.tgz#ace5f80d8c8348efe194f6d7074c6213c52b3944"
@@ -2486,6 +2511,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-darwin-x64/-/swc-darwin-x64-12.1.5.tgz#adcabb732d226453777c0d37d58eaff9328b66fd"
integrity sha512-wqJ3X7WQdTwSGi0kIDEmzw34QHISRIQ5uvC+VXmsIlCPFcMA+zM5723uh8NfuKGquDMiEMS31a83QgkuHMYbwQ==
+"@next/swc-linux-arm-gnueabihf@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.0.tgz#9ec6380a27938a5799aaa6035c205b3c478468a7"
+ integrity sha512-njUd9hpl6o6A5d08dC0cKAgXKCzm5fFtgGe6i0eko8IAdtAPbtHxtpre3VeSxdZvuGFh+hb0REySQP9T1ttkog==
+
"@next/swc-linux-arm-gnueabihf@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.4.tgz#2bf2c83863635f19c71c226a2df936e001cce29c"
@@ -2496,6 +2526,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm-gnueabihf/-/swc-linux-arm-gnueabihf-12.1.5.tgz#82a7cde67482b756bc65fbebf1dfa8a782074e93"
integrity sha512-WnhdM5duONMvt2CncAl+9pim0wBxDS2lHoo7ub/o/i1bRbs11UTzosKzEXVaTDCUkCX2c32lIDi1WcN2ZPkcdw==
+"@next/swc-linux-arm64-gnu@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.0.tgz#7f4196dff1049cea479607c75b81033ae2dbd093"
+ integrity sha512-OqangJLkRxVxMhDtcb7Qn1xjzFA3s50EIxY7mljbSCLybU+sByPaWAHY4px97ieOlr2y4S0xdPKkQ3BCAwyo6Q==
+
"@next/swc-linux-arm64-gnu@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.4.tgz#d577190f641c9b4b463719dd6b8953b6ba9be8d9"
@@ -2506,6 +2541,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-12.1.5.tgz#f82ca014504950aab751e81f467492e9be0bad5d"
integrity sha512-Jq2H68yQ4bLUhR/XQnbw3LDW0GMQn355qx6rU36BthDLeGue7YV7MqNPa8GKvrpPocEMW77nWx/1yI6w6J07gw==
+"@next/swc-linux-arm64-musl@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.0.tgz#b445f767569cdc2dddee785ca495e1a88c025566"
+ integrity sha512-hB8cLSt4GdmOpcwRe2UzI5UWn6HHO/vLkr5OTuNvCJ5xGDwpPXelVkYW/0+C3g5axbDW2Tym4S+MQCkkH9QfWA==
+
"@next/swc-linux-arm64-musl@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.4.tgz#e70ffe70393d8f9242deecdb282ce5a8fd588b14"
@@ -2516,6 +2556,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-12.1.5.tgz#f811ec9f4b12a978426c284c95ab2f515ddf7f9e"
integrity sha512-KgPjwdbhDqXI7ghNN8V/WAiLquc9Ebe8KBrNNEL0NQr+yd9CyKJ6KqjayVkmX+hbHzbyvbui/5wh/p3CZQ9xcQ==
+"@next/swc-linux-x64-gnu@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.0.tgz#67610e9be4fbc987de7535f1bcb17e45fe12f90e"
+ integrity sha512-OKO4R/digvrVuweSw/uBM4nSdyzsBV5EwkUeeG4KVpkIZEe64ZwRpnFB65bC6hGwxIBnTv5NMSnJ+0K/WmG78A==
+
"@next/swc-linux-x64-gnu@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.4.tgz#91498a130387fb1961902f2bee55863f8e910cff"
@@ -2526,6 +2571,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-gnu/-/swc-linux-x64-gnu-12.1.5.tgz#d44857257e6d20dc841998951d584ab1f25772c3"
integrity sha512-O2ErUTvCJ6DkNTSr9pbu1n3tcqykqE/ebty1rwClzIYdOgpB3T2MfEPP+K7GhUR87wmN/hlihO9ch7qpVFDGKw==
+"@next/swc-linux-x64-musl@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.0.tgz#ea19a23db08a9f2e34ac30401f774cf7d1669d31"
+ integrity sha512-JohhgAHZvOD3rQY7tlp7NlmvtvYHBYgY0x5ZCecUT6eCCcl9lv6iV3nfu82ErkxNk1H893fqH0FUpznZ/H3pSw==
+
"@next/swc-linux-x64-musl@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.4.tgz#78057b03c148c121553d41521ad38f6c732762ff"
@@ -2536,6 +2586,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-12.1.5.tgz#3cc523abadc9a2a6de680593aff06e71cc29ecef"
integrity sha512-1eIlZmlO/VRjxxzUBcVosf54AFU3ltAzHi+BJA+9U/lPxCYIsT+R4uO3QksRzRjKWhVQMRjEnlXyyq5SKJm7BA==
+"@next/swc-win32-arm64-msvc@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.0.tgz#eadf054fc412085659b98e145435bbba200b5283"
+ integrity sha512-T/3gIE6QEfKIJ4dmJk75v9hhNiYZhQYAoYm4iVo1TgcsuaKLFa+zMPh4056AHiG6n9tn2UQ1CFE8EoybEsqsSw==
+
"@next/swc-win32-arm64-msvc@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.4.tgz#05bbaabacac23b8edf6caa99eb86b17550a09051"
@@ -2546,6 +2601,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-12.1.5.tgz#c62232d869f1f9b22e8f24e4e7f05307c20f30ca"
integrity sha512-oromsfokbEuVb0CBLLE7R9qX3KGXucZpsojLpzUh1QJjuy1QkrPJncwr8xmWQnwgtQ6ecMWXgXPB+qtvizT9Tw==
+"@next/swc-win32-ia32-msvc@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.0.tgz#68faeae10c89f698bf9d28759172b74c9c21bda1"
+ integrity sha512-iwnKgHJdqhIW19H9PRPM9j55V6RdcOo6rX+5imx832BCWzkDbyomWnlzBfr6ByUYfhohb8QuH4hSGEikpPqI0Q==
+
"@next/swc-win32-ia32-msvc@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.4.tgz#8fd2fb48f04a2802e51fc320878bf6b411c1c866"
@@ -2556,6 +2616,11 @@
resolved "https://registry.yarnpkg.com/@next/swc-win32-ia32-msvc/-/swc-win32-ia32-msvc-12.1.5.tgz#2bd9b28a9ba730d12a493e7d9d18e150fe89d496"
integrity sha512-a/51L5KzBpeZSW9LbekMo3I3Cwul+V+QKwbEIMA+Qwb2qrlcn1L9h3lt8cHqNTFt2y72ce6aTwDTw1lyi5oIRA==
+"@next/swc-win32-x64-msvc@12.1.0":
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.0.tgz#d27e7e76c87a460a4da99c5bfdb1618dcd6cd064"
+ integrity sha512-aBvcbMwuanDH4EMrL2TthNJy+4nP59Bimn8egqv6GHMVj0a44cU6Au4PjOhLNqEh9l+IpRGBqMTzec94UdC5xg==
+
"@next/swc-win32-x64-msvc@12.1.4":
version "12.1.4"
resolved "https://registry.yarnpkg.com/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-12.1.4.tgz#a72ed44c9b1f850986a30fe36c59e01f8a79b5f3"
@@ -2843,12 +2908,12 @@
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.21.tgz#5de5a2385a35309427f6011992b544514d559aa1"
integrity sha512-a5Sab1C4/icpTZVzZc5Ghpz88yQtGOyNqYXcZgOssB2uuAr+wF/MvN6bgtW32q7HHrvBki+BsZ0OuNv6EV3K9g==
-"@prisma/client@3.10.0":
- version "3.10.0"
- resolved "https://registry.yarnpkg.com/@prisma/client/-/client-3.10.0.tgz#4782fe6f1b0e43c2a11a75ad4bb1098599d1dfb1"
- integrity sha512-6P4sV7WFuODSfSoSEzCH1qfmWMrCUBk1LIIuTbQf6m1LI/IOpLN4lnqGDmgiBGprEzuWobnGLfe9YsXLn0inrg==
+"@prisma/client@^3.12.0":
+ version "3.12.0"
+ resolved "https://registry.yarnpkg.com/@prisma/client/-/client-3.12.0.tgz#a0eb49ffea5c128dd11dffb896d7139a60073d12"
+ integrity sha512-4NEQjUcWja/NVBvfuDFscWSk1/rXg3+wj+TSkqXCb1tKlx/bsUE00rxsvOvGg7VZ6lw1JFpGkwjwmsOIc4zvQw==
dependencies:
- "@prisma/engines-version" "3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86"
+ "@prisma/engines-version" "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980"
"@prisma/debug@3.8.1":
version "3.8.1"
@@ -2859,10 +2924,10 @@
ms "2.1.3"
strip-ansi "6.0.1"
-"@prisma/engines-version@3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86":
- version "3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86"
- resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86.tgz#82750856fa637dd89b8f095d2dcc6ac0631231c6"
- integrity sha512-cVYs5gyQH/qyut24hUvDznCfPrWiNMKNfPb9WmEoiU6ihlkscIbCfkmuKTtspVLWRdl0LqjYEC7vfnPv17HWhw==
+"@prisma/engines-version@3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980":
+ version "3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980"
+ resolved "https://registry.yarnpkg.com/@prisma/engines-version/-/engines-version-3.12.0-37.22b822189f46ef0dc5c5b503368d1bee01213980.tgz#829ca3d9d0d92555f44644606d4edfd45b2f5886"
+ integrity sha512-o+jo8d7ZEiVpcpNWUDh3fj2uPQpBxl79XE9ih9nkogJbhw6P33274SHnqheedZ7PyvPIK/mvU8MLNYgetgXPYw==
"@prisma/engines@3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86":
version "3.10.0-50.73e60b76d394f8d37d8ebd1f8918c79029f0db86"
@@ -3746,6 +3811,11 @@
dependencies:
"@types/node" "*"
+"@types/debounce@^1.2.1":
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/@types/debounce/-/debounce-1.2.1.tgz#79b65710bc8b6d44094d286aecf38e44f9627852"
+ integrity sha512-epMsEE85fi4lfmJUH/89/iV/LI+F5CvNIvmgs5g5jYFPfhO2S/ae8WSsLOKWdwtoaZw9Q2IhJ4tQ5tFCcS/4HA==
+
"@types/debug@4.1.7", "@types/debug@^4.0.0":
version "4.1.7"
resolved "https://registry.yarnpkg.com/@types/debug/-/debug-4.1.7.tgz#7cc0ea761509124709b8b2d1090d8f6c17aadb82"
@@ -3947,6 +4017,11 @@
resolved "https://registry.yarnpkg.com/@types/node/-/node-16.9.1.tgz#0611b37db4246c937feef529ddcc018cf8e35708"
integrity sha512-QpLcX9ZSsq3YYUUnD3nFDY8H7wctAhQj/TFKL8Ya8v5fMm3CFXxo8zStsLAl780ltoYoo1WvKUVGBQK+1ifr7g==
+"@types/node@17.0.21":
+ version "17.0.21"
+ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.21.tgz#864b987c0c68d07b4345845c3e63b75edd143644"
+ integrity sha512-DBZCJbhII3r90XbQxI8Y9IjjiiOGlZ0Hr32omXIZvwwZ7p4DMMXGrKXVyPfuoBOri9XNtL0UK69jYIBIsRX3QQ==
+
"@types/node@^12.12.6":
version "12.20.47"
resolved "https://registry.yarnpkg.com/@types/node/-/node-12.20.47.tgz#ca9237d51f2a2557419688511dab1c8daf475188"
@@ -4068,6 +4143,15 @@
"@types/scheduler" "*"
csstype "^3.0.2"
+"@types/react@17.0.40":
+ version "17.0.40"
+ resolved "https://registry.yarnpkg.com/@types/react/-/react-17.0.40.tgz#dc010cee6254d5239a138083f3799a16638e6bad"
+ integrity sha512-UrXhD/JyLH+W70nNSufXqMZNuUD2cXHu6UjCllC6pmOQgBX4SGXOH8fjRka0O0Ee0HrFxapDD8Bwn81Kmiz6jQ==
+ dependencies:
+ "@types/prop-types" "*"
+ "@types/scheduler" "*"
+ csstype "^3.0.2"
+
"@types/retry@^0.12.0":
version "0.12.1"
resolved "https://registry.yarnpkg.com/@types/retry/-/retry-0.12.1.tgz#d8f1c0d0dc23afad6dc16a9e993a0865774b4065"
@@ -4714,7 +4798,7 @@ autolinker@^3.11.0:
dependencies:
tslib "^2.3.0"
-autoprefixer@^10.3.4, autoprefixer@^10.4.0:
+autoprefixer@^10.3.4, autoprefixer@^10.4.0, autoprefixer@^10.4.2:
version "10.4.4"
resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.4.tgz#3e85a245b32da876a893d3ac2ea19f01e7ea5a1e"
integrity sha512-Tm8JxsB286VweiZ5F0anmbyGiNI3v3wGv3mz9W+cxEDYB/6jbnj6GM9H9mK3wIL8ftgl+C07Lcwb8PG5PCCPzA==
@@ -5543,6 +5627,11 @@ chardet@^0.7.0:
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
integrity sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==
+chart.js@^3.7.1:
+ version "3.7.1"
+ resolved "https://registry.yarnpkg.com/chart.js/-/chart.js-3.7.1.tgz#0516f690c6a8680c6c707e31a4c1807a6f400ada"
+ integrity sha512-8knRegQLFnPQAheZV8MjxIXc5gQEfDFD897BJgv/klO/vtIyFFmgMXrNfgrXpbTr/XbTturxRgxIXx/Y+ASJBA==
+
chokidar@^3.5.3:
version "3.5.3"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
@@ -7086,6 +7175,47 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0:
resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826"
integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==
+eslint@8.10.0:
+ version "8.10.0"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.10.0.tgz#931be395eb60f900c01658b278e05b6dae47199d"
+ integrity sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==
+ dependencies:
+ "@eslint/eslintrc" "^1.2.0"
+ "@humanwhocodes/config-array" "^0.9.2"
+ ajv "^6.10.0"
+ chalk "^4.0.0"
+ cross-spawn "^7.0.2"
+ debug "^4.3.2"
+ doctrine "^3.0.0"
+ escape-string-regexp "^4.0.0"
+ eslint-scope "^7.1.1"
+ eslint-utils "^3.0.0"
+ eslint-visitor-keys "^3.3.0"
+ espree "^9.3.1"
+ esquery "^1.4.0"
+ esutils "^2.0.2"
+ fast-deep-equal "^3.1.3"
+ file-entry-cache "^6.0.1"
+ functional-red-black-tree "^1.0.1"
+ glob-parent "^6.0.1"
+ globals "^13.6.0"
+ ignore "^5.2.0"
+ import-fresh "^3.0.0"
+ imurmurhash "^0.1.4"
+ is-glob "^4.0.0"
+ js-yaml "^4.1.0"
+ json-stable-stringify-without-jsonify "^1.0.1"
+ levn "^0.4.1"
+ lodash.merge "^4.6.2"
+ minimatch "^3.0.4"
+ natural-compare "^1.4.0"
+ optionator "^0.9.1"
+ regexpp "^3.2.0"
+ strip-ansi "^6.0.1"
+ strip-json-comments "^3.1.0"
+ text-table "^0.2.0"
+ v8-compile-cache "^2.0.3"
+
eslint@^8.10.0, eslint@^8.11.0:
version "8.11.0"
resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.11.0.tgz#88b91cfba1356fc10bb9eb592958457dfe09fb37"
@@ -12095,10 +12225,10 @@ next-api-middleware@^1.0.1:
dependencies:
debug "^4.3.2"
-next-auth@^4.0.6:
- version "4.3.1"
- resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.3.1.tgz#94520592d1d1851eb66ca3ad2758637e1df950e1"
- integrity sha512-DBYEPBLq5naIqh/1i2zEHljcA1OXXecKW3NRU1W4s6R3UX3RdLZ2lWlqgBHUiZQ1zdNikFM/bYQxVGyG7bx8oA==
+next-auth@^4.3.3:
+ version "4.3.3"
+ resolved "https://registry.yarnpkg.com/next-auth/-/next-auth-4.3.3.tgz#5ff892e73648a0f33c2af0e9d7cafda729f63ae7"
+ integrity sha512-bUs+oOOPT18Pq/+4v9q4PA/DGoVoAX6jwY7RTfE/akFXwlny+y/mNS6lPSUwpqcHjljqBaq34PQA3+01SdOOPw==
dependencies:
"@babel/runtime" "^7.16.3"
"@panva/hkdf" "^1.0.1"
@@ -12182,6 +12312,29 @@ next-validations@^0.1.11:
resolved "https://registry.yarnpkg.com/next-validations/-/next-validations-0.1.11.tgz#fcc62dea5be8f9793d410de175f96e3fc1dac54d"
integrity sha512-rdyRgZ3f3jwhLigdi9MC5R74BvRpB3cewa8LVnMHDiDRnSThvX0CdZ5KHK4t/SgrIGaVXiXOQ59KtvBqjcm5pA==
+next@12.1.0:
+ version "12.1.0"
+ resolved "https://registry.yarnpkg.com/next/-/next-12.1.0.tgz#c33d753b644be92fc58e06e5a214f143da61dd5d"
+ integrity sha512-s885kWvnIlxsUFHq9UGyIyLiuD0G3BUC/xrH0CEnH5lHEWkwQcHOORgbDF0hbrW9vr/7am4ETfX4A7M6DjrE7Q==
+ dependencies:
+ "@next/env" "12.1.0"
+ caniuse-lite "^1.0.30001283"
+ postcss "8.4.5"
+ styled-jsx "5.0.0"
+ use-subscription "1.5.1"
+ optionalDependencies:
+ "@next/swc-android-arm64" "12.1.0"
+ "@next/swc-darwin-arm64" "12.1.0"
+ "@next/swc-darwin-x64" "12.1.0"
+ "@next/swc-linux-arm-gnueabihf" "12.1.0"
+ "@next/swc-linux-arm64-gnu" "12.1.0"
+ "@next/swc-linux-arm64-musl" "12.1.0"
+ "@next/swc-linux-x64-gnu" "12.1.0"
+ "@next/swc-linux-x64-musl" "12.1.0"
+ "@next/swc-win32-arm64-msvc" "12.1.0"
+ "@next/swc-win32-ia32-msvc" "12.1.0"
+ "@next/swc-win32-x64-msvc" "12.1.0"
+
next@12.1.4, next@^12.1.0:
version "12.1.4"
resolved "https://registry.yarnpkg.com/next/-/next-12.1.4.tgz#597a9bdec7aec778b442c4f6d41afd2c64a54b23"
@@ -13290,7 +13443,7 @@ postcss@8.4.5:
picocolors "^1.0.0"
source-map-js "^1.0.1"
-postcss@^8.3.6, postcss@^8.4.12, postcss@^8.4.4, postcss@^8.4.6:
+postcss@^8.3.6, postcss@^8.4.12, postcss@^8.4.4, postcss@^8.4.6, postcss@^8.4.8:
version "8.4.12"
resolved "https://registry.yarnpkg.com/postcss/-/postcss-8.4.12.tgz#1e7de78733b28970fa4743f7da6f3763648b1905"
integrity sha512-lg6eITwYe9v6Hr5CncVbK70SoioNQIq81nsaG86ev5hAidQvmOeETBqs7jm43K2F5/Ley3ytDtriImV6TpNiSg==
@@ -13715,6 +13868,11 @@ react-calendar@^3.3.1:
merge-class-names "^1.1.1"
prop-types "^15.6.0"
+react-chartjs-2@^4.0.1:
+ version "4.1.0"
+ resolved "https://registry.yarnpkg.com/react-chartjs-2/-/react-chartjs-2-4.1.0.tgz#2a123df16d3a987c54eb4e810ed766d3c03adf8d"
+ integrity sha512-AsUihxEp8Jm1oBhbEovE+w50m9PVNhz1sfwEIT4hZduRC0m14gHWHd0cUaxkFDb8HNkdMIGzsNlmVqKiOpU74g==
+
react-colorful@^5.5.1:
version "5.5.1"
resolved "https://registry.yarnpkg.com/react-colorful/-/react-colorful-5.5.1.tgz#29d9c4e496f2ca784dd2bb5053a3a4340cfaf784"
@@ -15385,6 +15543,11 @@ style-to-object@^0.3.0:
dependencies:
inline-style-parser "0.1.1"
+styled-jsx@5.0.0:
+ version "5.0.0"
+ resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.0.tgz#816b4b92e07b1786c6b7111821750e0ba4d26e77"
+ integrity sha512-qUqsWoBquEdERe10EW8vLp3jT25s/ssG1/qX5gZ4wu15OZpmSMFI2v+fWlRhLfykA5rFtlJ1ME8A8pm/peV4WA==
+
styled-jsx@5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/styled-jsx/-/styled-jsx-5.0.1.tgz#78fecbbad2bf95ce6cd981a08918ce4696f5fc80"
@@ -15549,6 +15712,11 @@ swarm-js@^0.1.40:
tar "^4.0.2"
xhr-request "^1.0.1"
+swr@^1.2.2:
+ version "1.3.0"
+ resolved "https://registry.yarnpkg.com/swr/-/swr-1.3.0.tgz#c6531866a35b4db37b38b72c45a63171faf9f4e8"
+ integrity sha512-dkghQrOl2ORX9HYrMDtPa7LTVHJjCTeZoB1dqTbnnEDlSvN8JEKpYIYurDfvbQFUUS8Cg8PceFVZNkW0KNNYPw==
+
symbol-tree@^3.2.4:
version "3.2.4"
resolved "https://registry.yarnpkg.com/symbol-tree/-/symbol-tree-3.2.4.tgz#430637d248ba77e078883951fb9aa0eed7c63fa2"
@@ -16463,6 +16631,13 @@ use-sidecar@^1.0.1:
detect-node-es "^1.1.0"
tslib "^1.9.3"
+use-subscription@1.5.1:
+ version "1.5.1"
+ resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.5.1.tgz#73501107f02fad84c6dd57965beb0b75c68c42d1"
+ integrity sha512-Xv2a1P/yReAjAbhylMfFplFKj9GssgTwN7RlcTxBujFQcloStWNDQdc4g4NRWH9xS4i/FDk04vQBptAXoF3VcA==
+ dependencies:
+ object-assign "^4.1.1"
+
use@^3.1.0:
version "3.1.1"
resolved "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f"
@@ -17458,7 +17633,7 @@ zod-prisma@^0.5.4:
parenthesis "^3.1.8"
ts-morph "^13.0.2"
-zod@^3.14.4, zod@^3.9.5:
+zod@^3.14.4:
version "3.14.4"
resolved "https://registry.yarnpkg.com/zod/-/zod-3.14.4.tgz#e678fe9e5469f4663165a5c35c8f3dc66334a5d6"
integrity sha512-U9BFLb2GO34Sfo9IUYp0w3wJLlmcyGoMd75qU9yf+DrdGA4kEx6e+l9KOkAlyUO0PSQzZCa3TR4qVlcmwqSDuw==