This commit is contained in:
zomars 2023-01-18 10:20:03 -07:00
parent 3ae98e537e
commit ef9bbaf889
10 changed files with 1 additions and 166 deletions

1
apps/auth Submodule

@ -0,0 +1 @@
Subproject commit a74ac5ec4c13ebf14a827f8cfc4704e271fa0c6b

View File

@ -1 +0,0 @@
module.exports = require("@calcom/config/eslint-preset");

36
apps/auth/.gitignore vendored
View File

@ -1,36 +0,0 @@
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
# dependencies
/node_modules
/.pnp
.pnp.js
# testing
/coverage
# next.js
/.next/
/out/
# production
/build
# misc
.DS_Store
*.pem
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
.pnpm-debug.log*
# local env files
.env*.local
# vercel
.vercel
# typescript
*.tsbuildinfo
next-env.d.ts

View File

@ -1 +0,0 @@
This is a [Next.js](https://nextjs.org/) project bootstrapped with `create-next-app`.

View File

@ -1,34 +0,0 @@
require("dotenv").config({ path: "../../.env" });
/** @type {import('next').NextConfig} */
const nextConfig = {
reactStrictMode: true,
swcMinify: true,
transpilePackages: [
"@calcom/app-store-cli",
"@calcom/app-store",
"@calcom/config",
"@calcom/core",
"@calcom/dayjs",
"@calcom/embed-core",
"@calcom/embed-react",
"@calcom/embed-snippet",
"@calcom/features",
"@calcom/types",
"@calcom/lib",
"@calcom/prisma",
"@calcom/trpc",
"@calcom/tsconfig",
"@calcom/ui",
],
rewrites() {
return [
{
source: "/auth/:rest*",
destination: process.env.NEXT_PUBLIC_WEBAPP_URL + "/auth/:rest*",
},
];
},
};
module.exports = nextConfig;

View File

@ -1,41 +0,0 @@
{
"name": "@calcom/auth",
"description": "Auth module for Calcom",
"authors": "Cal.com, Inc.",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev -p 3006",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@calcom/app-store-cli": "*",
"@calcom/app-store": "*",
"@calcom/config": "*",
"@calcom/core": "*",
"@calcom/dayjs": "*",
"@calcom/embed-core": "*",
"@calcom/embed-react": "*",
"@calcom/embed-snippet": "*",
"@calcom/features": "*",
"@calcom/types": "*",
"@calcom/lib": "*",
"@calcom/prisma": "*",
"@calcom/trpc": "*",
"@calcom/tsconfig": "*",
"@calcom/ui": "*",
"@auth/core": "^0.1.4",
"@types/node": "18.11.15",
"@types/react": "18.0.26",
"@types/react-dom": "18.0.9",
"eslint": "^8.22.0",
"eslint-config-next": "^13.1.1",
"next": "^13.1.1",
"next-auth": "^4.18.8",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "4.9.4"
}
}

View File

@ -1,13 +0,0 @@
import { TooltipProvider } from "@radix-ui/react-tooltip";
import { SessionProvider } from "next-auth/react";
import type { AppProps } from "next/app";
export default function App({ Component, pageProps: { session, ...pageProps } }: AppProps) {
return (
<SessionProvider session={session}>
<TooltipProvider>
<Component {...pageProps} />
</TooltipProvider>
</SessionProvider>
);
}

View File

@ -1 +0,0 @@
export { default } from "@calcom/features/auth/api/dynamicHandler";

View File

@ -1,19 +0,0 @@
import { signIn, signOut, useSession } from "next-auth/react";
export default function Component() {
const { data: session } = useSession();
if (session) {
return (
<>
Signed in as {session.user?.email} <br />
<button onClick={() => signOut()}>Sign out</button>
</>
);
}
return (
<>
Not signed in <br />
<button onClick={() => signIn()}>Sign in</button>
</>
);
}

View File

@ -1,20 +0,0 @@
{
"extends": "@calcom/tsconfig/nextjs.json",
"compilerOptions": {
"strict": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"~/*": ["*"],
"@prisma/client/*": ["@calcom/prisma/client/*"]
}
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"../../packages/types/*.d.ts",
"../../packages/types/next-auth.d.ts"
],
"exclude": ["node_modules", "templates", "auth"]
}