From 930d875545ca12d78bc311ce2c14837ea17179a8 Mon Sep 17 00:00:00 2001 From: Security2431 Date: Thu, 4 Jan 2024 09:24:16 +0200 Subject: [PATCH] fix: add google provider for auth --- .../src/app/_components/auth-showcase.tsx | 9 ++------ apps/nextjs/src/app/_components/button.tsx | 2 ++ .../nextjs/src/app/_components/form/Input.tsx | 2 +- .../nextjs/src/app/_components/form/Label.tsx | 5 ++++- apps/nextjs/src/components/auth.tsx | 21 ++++++++++++------- packages/auth/index.ts | 15 ++++++++----- 6 files changed, 33 insertions(+), 21 deletions(-) diff --git a/apps/nextjs/src/app/_components/auth-showcase.tsx b/apps/nextjs/src/app/_components/auth-showcase.tsx index b018e93f..afe607b1 100644 --- a/apps/nextjs/src/app/_components/auth-showcase.tsx +++ b/apps/nextjs/src/app/_components/auth-showcase.tsx @@ -12,10 +12,7 @@ export async function AuthShowcase({ provider }: Props) { if (!session) { return ( - + Sign in with {provider.charAt(0).toUpperCase() + provider.slice(1)} ); @@ -27,9 +24,7 @@ export async function AuthShowcase({ provider }: Props) { {session && Logged in as {session.user.name}}

- - Sign out - + Sign out ); } diff --git a/apps/nextjs/src/app/_components/button.tsx b/apps/nextjs/src/app/_components/button.tsx index 13e47bfd..0e213f27 100644 --- a/apps/nextjs/src/app/_components/button.tsx +++ b/apps/nextjs/src/app/_components/button.tsx @@ -37,6 +37,8 @@ const Button = forwardRef( { "border border-white bg-transparent px-4 py-2 text-white no-underline hover:border-transparent hover:bg-white hover:text-purple-500": variant === "primary", + "rounded-full bg-white/10 px-10 py-3 font-semibold no-underline transition hover:bg-white/20": + variant === "secondary", "p-0 text-white hover:underline": variant === "link", }, className, diff --git a/apps/nextjs/src/app/_components/form/Input.tsx b/apps/nextjs/src/app/_components/form/Input.tsx index 7eb71b0d..fc456243 100644 --- a/apps/nextjs/src/app/_components/form/Input.tsx +++ b/apps/nextjs/src/app/_components/form/Input.tsx @@ -13,7 +13,7 @@ type Props = InputHTMLAttributes; /* ============================================================================= */ const Input = forwardRef( - ({ onClick, className, type, ...props }, ref) => ( + ({ onClick, className, type = "text", ...props }, ref) => ( (