MingruiZhang's picture
done (#4)
f80b091 unverified
raw
history blame
No virus
524 Bytes
import { auth } from '@/auth';
import { LoginButton } from '@/components/LoginButton';
import { redirect } from 'next/navigation';
export default async function SignInPage() {
const session = await auth();
// redirect to home if user is already logged in
if (session?.user) {
redirect('/');
}
return (
<div className="flex flex-col h-[calc(100vh-theme(spacing.16))] items-center justify-center py-10 space-y-2">
<LoginButton oauth="google" />
<LoginButton oauth="github" />
</div>
);
}