diff --git a/dashboard/final-example/app/ui/login-form.tsx b/dashboard/final-example/app/ui/login-form.tsx
index 5fa1374..1f68e2d 100644
--- a/dashboard/final-example/app/ui/login-form.tsx
+++ b/dashboard/final-example/app/ui/login-form.tsx
@@ -62,9 +62,7 @@ export default function LoginForm() {
-
+
{code === 'CredentialsSignin' && (
<>
diff --git a/dashboard/final-example/package.json b/dashboard/final-example/package.json
index 849afb4..3fdbaed 100644
--- a/dashboard/final-example/package.json
+++ b/dashboard/final-example/package.json
@@ -13,10 +13,8 @@
"@types/node": "20.5.7",
"@vercel/postgres": "^0.5.0",
"autoprefixer": "10.4.15",
- "bcrypt": "^5.1.1",
"clsx": "^2.0.0",
"next": "13.5.7-canary.27",
- "next-auth": "5.0.0-beta.2",
"postcss": "8.4.31",
"react": "18.2.0",
"react-dom": "18.2.0",
diff --git a/dashboard/starter-example/app/dashboard/customers/page.tsx b/dashboard/starter-example/app/dashboard/customers/page.tsx
index 601da16..dcd62af 100644
--- a/dashboard/starter-example/app/dashboard/customers/page.tsx
+++ b/dashboard/starter-example/app/dashboard/customers/page.tsx
@@ -1,6 +1,5 @@
import { fetchFilteredCustomers } from '@/app/lib/data';
import CustomersTable from '@/app/ui/customers/table';
-import { Metadata } from 'next';
export default async function Page({
searchParams,
diff --git a/dashboard/starter-example/app/lib/actions.ts b/dashboard/starter-example/app/lib/actions.ts
index 1a318db..08d14f4 100644
--- a/dashboard/starter-example/app/lib/actions.ts
+++ b/dashboard/starter-example/app/lib/actions.ts
@@ -4,7 +4,6 @@ import { z } from 'zod';
import { sql } from '@vercel/postgres';
import { revalidatePath } from 'next/cache';
import { redirect } from 'next/navigation';
-import { signIn } from '@/auth';
const FormSchema = z.object({
id: z.string(),
@@ -120,17 +119,3 @@ export async function deleteInvoice(formData: FormData) {
return { message: 'Database Error: Failed to Delete Invoice.' };
}
}
-
-export async function authenticate(
- prevState: string | undefined,
- formData: FormData,
-) {
- try {
- await signIn('credentials', Object.fromEntries(formData));
- } catch (error) {
- if ((error as Error).message.includes('CredentialsSignin')) {
- return 'CredentialsSignin';
- }
- throw error;
- }
-}
diff --git a/dashboard/starter-example/app/login/page.tsx b/dashboard/starter-example/app/login/page.tsx
deleted file mode 100644
index 5c07299..0000000
--- a/dashboard/starter-example/app/login/page.tsx
+++ /dev/null
@@ -1,17 +0,0 @@
-import AcmeLogo from '@/app/ui/acme-logo';
-import LoginForm from '@/app/ui/login-form';
-
-export default function LoginPage() {
- return (
-
-
-
- );
-}
diff --git a/dashboard/starter-example/app/ui/login-form.tsx b/dashboard/starter-example/app/ui/login-form.tsx
index 5fa1374..79283f4 100644
--- a/dashboard/starter-example/app/ui/login-form.tsx
+++ b/dashboard/starter-example/app/ui/login-form.tsx
@@ -1,6 +1,5 @@
'use client';
-import { authenticate } from '@/app/lib/actions';
import { lusitana } from '@/app/ui/fonts';
import {
AtSymbolIcon,
@@ -9,14 +8,10 @@ import {
} from '@heroicons/react/24/outline';
import { ArrowRightIcon } from '@heroicons/react/20/solid';
import { Button } from './button';
-import { useFormState, useFormStatus } from 'react-dom';
export default function LoginForm() {
- const [code, action] = useFormState(authenticate, undefined);
- const { pending } = useFormStatus();
-
return (
-
-