diff --git a/apps/web/app/(auth)/auth-buttons.tsx b/apps/web/app/(auth)/auth-buttons.tsx index 9da1f5a5..47dc1448 100644 --- a/apps/web/app/(auth)/auth-buttons.tsx +++ b/apps/web/app/(auth)/auth-buttons.tsx @@ -1,6 +1,6 @@ "use client"; -import { Button } from "@repo/ui/src/button"; +import { Button } from "@repo/ui/src/shadcn/button"; import React from "react"; import { signIn } from "../helpers/server/auth"; diff --git a/apps/web/app/(auth)/signin/page.tsx b/apps/web/app/(auth)/signin/page.tsx index 44d2b4f4..03f2ad7c 100644 --- a/apps/web/app/(auth)/signin/page.tsx +++ b/apps/web/app/(auth)/signin/page.tsx @@ -1,8 +1,85 @@ -import { getThemeToggler } from "../../helpers/lib/get-theme-button"; +import Image from "next/image"; +import Link from "next/link"; +import Logo from "@/public/logo.svg"; +import { signIn } from "@/app/helpers/server/auth"; +import { Google } from "@repo/ui/src/components/icons"; + +export const runtime = "edge"; async function Signin() { - const SetThemeButton = getThemeToggler(); - return ; + return ( +
+
+
+ SuperMemory logo + SuperMemory.ai +
+ +
+

+ Hello, human{" "} +

+

+ Write, ideate, and learn with all the wisdom of your bookmarks. +

+
+
+
{ + "use server"; + await signIn("google"); + }} + > + +
+
+
+
+ By continuing, you agree to the + + {" "} + Terms of Service + {" "} + and + + {" "} + Privacy Policy + +
+
+
+
+ + Ready for your{" "} + Second brain? + + +
+ Carousel 01 +
+
+
+ ); } export default Signin; diff --git a/apps/web/app/(landing)/Navbar.tsx b/apps/web/app/(landing)/Navbar.tsx index 1208d1ec..1ad43436 100644 --- a/apps/web/app/(landing)/Navbar.tsx +++ b/apps/web/app/(landing)/Navbar.tsx @@ -23,7 +23,7 @@ function Navbar() { Login diff --git a/apps/web/app/helpers/server/auth.ts b/apps/web/app/helpers/server/auth.ts index e2817cf0..73119d87 100644 --- a/apps/web/app/helpers/server/auth.ts +++ b/apps/web/app/helpers/server/auth.ts @@ -9,7 +9,7 @@ export const { signOut, auth, } = NextAuth({ - secret: process.env.NEXTAUTH_SECRET ?? process.env.AUTH_SECRET, + secret: process.env.BACKEND_SECURITY_KEY, callbacks: { session: ({ session, token, user }) => ({ ...session, diff --git a/apps/web/app/layout.tsx b/apps/web/app/layout.tsx index da6fc2db..e1956914 100644 --- a/apps/web/app/layout.tsx +++ b/apps/web/app/layout.tsx @@ -2,10 +2,11 @@ import "./globals.css"; import type { Metadata } from "next"; import { Inter } from "next/font/google"; -import { ThemeScript } from "next-app-theme/theme-script"; const inter = Inter({ subsets: ["latin"] }); +export const runtime = "edge"; + export const metadata: Metadata = { title: "Supermemory - Your personal second brain.", description: diff --git a/apps/web/app/page-ref.tsx b/apps/web/app/ref/page.tsx similarity index 95% rename from apps/web/app/page-ref.tsx rename to apps/web/app/ref/page.tsx index 2d4c9cc3..667f618c 100644 --- a/apps/web/app/page-ref.tsx +++ b/apps/web/app/ref/page.tsx @@ -1,9 +1,9 @@ import { Button } from "@repo/ui/src/shadcn/button"; -import { auth, signIn, signOut } from "./helpers/server/auth"; -import { db } from "./helpers/server/db"; +import { auth, signIn, signOut } from "../helpers/server/auth"; +import { db } from "../helpers/server/db"; import { sql } from "drizzle-orm"; -import { users } from "./helpers/server/db/schema"; -import { getThemeToggler } from "./helpers/lib/get-theme-button"; +import { users } from "../helpers/server/db/schema"; +import { getThemeToggler } from "../helpers/lib/get-theme-button"; export const runtime = "edge"; diff --git a/apps/web/env.d.ts b/apps/web/env.d.ts index 161177a1..2755280c 100644 --- a/apps/web/env.d.ts +++ b/apps/web/env.d.ts @@ -1,10 +1,10 @@ -// Generated by Wrangler on Sat May 25 2024 23:32:58 GMT-0500 (Central Daylight Time) +// Generated by Wrangler on Sun May 26 2024 17:03:05 GMT-0500 (Central Daylight Time) // by running `wrangler types --env-interface CloudflareEnv env.d.ts` interface CloudflareEnv { GOOGLE_CLIENT_ID: string; GOOGLE_CLIENT_SECRET: string; - NEXTAUTH_SECRET: string; + AUTH_SECRET: string; R2_ENDPOINT: string; R2_ACCESS_ID: string; R2_SECRET_KEY: string; diff --git a/packages/ui/src/components/icons.tsx b/packages/ui/src/components/icons.tsx index a7e0ef1a..d72c8e1f 100644 --- a/packages/ui/src/components/icons.tsx +++ b/packages/ui/src/components/icons.tsx @@ -274,3 +274,31 @@ export const X = (props: SVGProps) => ( /> ); + +export const Google = (props: SVGProps) => ( + + + + + + +);