Authentication with Credentials is working and setup, same for OAuth with Google.

This commit is contained in:
charles-gauthereau
2024-11-09 21:38:18 +01:00
parent 6541cfcc26
commit 6d90bb23c1
24 changed files with 784 additions and 341 deletions
+1 -4
View File
@@ -1,18 +1,15 @@
import Home from "./home/page";
import {redirect} from "next/navigation";
import {currentUser} from "@/auth/current-user";
export default async function Index() {
const user = await currentUser()
console.log(user)
if (user) {
redirect("/dashboard")
}
redirect("/login")
//Do not delete
// return (
// <Home/>
// );