import { signIn, signOut, useSession } from "next-auth/react"; import { Button } from "antd"; import BasePage from "@ui/pages/BasePage"; export default function LoginPage() { const { data: session } = useSession(); async function handleSignIn() { const result = await signIn('credentials', { redirect: false }, { password: 'super-secret-password' }) console.log(result) } return ( {session ? ( Signed in
) : ( ) }
); }