fix add login page based on providers
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { redirect } from "next/navigation";
|
||||
import { getServerAuthSession } from "~/server/auth";
|
||||
import LoginPage from "./login-page";
|
||||
import { getProviders } from "next-auth/react";
|
||||
|
||||
export default async function Login() {
|
||||
const session = await getServerAuthSession();
|
||||
@@ -9,5 +10,7 @@ export default async function Login() {
|
||||
redirect("/dashboard");
|
||||
}
|
||||
|
||||
return <LoginPage />;
|
||||
const providers = await getProviders();
|
||||
|
||||
return <LoginPage providers={Object.values(providers ?? {})} />;
|
||||
}
|
||||
|
Reference in New Issue
Block a user