22 lines
590 B
TypeScript
22 lines
590 B
TypeScript
// app/login/page.tsx (oder eine Client-Komponente)
|
|
'use client';
|
|
|
|
import { signIn } from 'next-auth/react';
|
|
import LoginForm from '@/components/auth/LoginForm';
|
|
|
|
export default function LoginPage() {
|
|
return (
|
|
<LoginForm
|
|
showSocialLogin={false}
|
|
onSubmit={async ({ email, password }) => {
|
|
// NextAuth kümmert sich um Redirect (inkl. callbackUrl)
|
|
await signIn('credentials', {
|
|
email,
|
|
password,
|
|
// callbackUrl: '/', // optional, sonst nimmt er den ursprünglichen Pfad
|
|
});
|
|
}}
|
|
/>
|
|
);
|
|
}
|