Working on auth with credentials.

This commit is contained in:
charles-gauthereau
2024-11-03 21:12:40 +01:00
parent d6ff290f66
commit 3587849803
28 changed files with 1039 additions and 591 deletions
+9 -4
View File
@@ -1,14 +1,19 @@
import Home from "./home/page";
import {redirect} from "next/navigation";
import {currentUser} from "@/auth/current-user";
export default async function Index() {
const user = true
const user = await currentUser()
console.log(user)
if (user) {
redirect("/dashboard")
}
redirect("/login")
return (
<Home/>
);
// return (
// <Home/>
// );
}