update(auth): add authentication and layout improvements
This commit is contained in:
Vendored
+3
@@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"WillLuke.nextjs.hasPrompted": true
|
||||||
|
}
|
||||||
+14
-5
@@ -15,11 +15,13 @@ const geistMono = Geist_Mono({
|
|||||||
|
|
||||||
export const metadata: Metadata = {
|
export const metadata: Metadata = {
|
||||||
title: "WikiRush - Jeu de navigation Wikipedia",
|
title: "WikiRush - Jeu de navigation Wikipedia",
|
||||||
description: "Navigue entre les articles Wikipedia pour atteindre la cible en premier !",
|
description:
|
||||||
|
"Navigue entre les articles Wikipedia pour atteindre la cible en premier !",
|
||||||
metadataBase: new URL("https://wikirush.xyz"),
|
metadataBase: new URL("https://wikirush.xyz"),
|
||||||
openGraph: {
|
openGraph: {
|
||||||
title: "WikiRush",
|
title: "WikiRush",
|
||||||
description: "Navigue entre les articles Wikipedia pour atteindre la cible en premier !",
|
description:
|
||||||
|
"Navigue entre les articles Wikipedia pour atteindre la cible en premier !",
|
||||||
url: "https://wikirush.xyz",
|
url: "https://wikirush.xyz",
|
||||||
siteName: "WikiRush",
|
siteName: "WikiRush",
|
||||||
locale: "fr_FR",
|
locale: "fr_FR",
|
||||||
@@ -37,15 +39,22 @@ export default function RootLayout({
|
|||||||
lang="fr"
|
lang="fr"
|
||||||
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
className={`${geistSans.variable} ${geistMono.variable} h-full antialiased`}
|
||||||
>
|
>
|
||||||
<body className="min-h-full flex flex-col" style={{ background: "#0f0f0f", color: "#f0f0f0" }}>
|
<body
|
||||||
|
className="min-h-full flex flex-col"
|
||||||
|
style={{ background: "#0f0f0f", color: "#f0f0f0" }}
|
||||||
|
>
|
||||||
<Providers>
|
<Providers>
|
||||||
<main className="flex-1">{children}</main>
|
<main className="flex-1">{children}</main>
|
||||||
<footer className="border-t border-[#2e2e2e] py-4 px-4 flex items-center justify-center gap-4 text-xs text-[#555]">
|
<footer className="border-t border-[#2e2e2e] py-4 px-4 flex items-center justify-center gap-4 text-xs text-[#555]">
|
||||||
<span>© {new Date().getFullYear()} WikiRush</span>
|
<span>© {new Date().getFullYear()} WikiRush</span>
|
||||||
<span>·</span>
|
<span>·</span>
|
||||||
<a href="/privacy" className="hover:text-[#888] transition-colors">Politique de confidentialité</a>
|
<a href="/privacy" className="hover:text-[#888] transition-colors">
|
||||||
|
Politique de confidentialité
|
||||||
|
</a>
|
||||||
<span>·</span>
|
<span>·</span>
|
||||||
<a href="/about" className="hover:text-[#888] transition-colors">À propos</a>
|
<a href="/about" className="hover:text-[#888] transition-colors">
|
||||||
|
À propos
|
||||||
|
</a>
|
||||||
</footer>
|
</footer>
|
||||||
</Providers>
|
</Providers>
|
||||||
</body>
|
</body>
|
||||||
|
|||||||
@@ -16,7 +16,10 @@ export const { handlers, auth, signIn, signOut } = NextAuth({
|
|||||||
where: { email: credentials.email as string },
|
where: { email: credentials.email as string },
|
||||||
});
|
});
|
||||||
if (!user) return null;
|
if (!user) return null;
|
||||||
const valid = await bcrypt.compare(credentials.password as string, user.password);
|
const valid = await bcrypt.compare(
|
||||||
|
credentials.password as string,
|
||||||
|
user.password,
|
||||||
|
);
|
||||||
if (!valid) return null;
|
if (!valid) return null;
|
||||||
return { id: user.id, name: user.name, email: user.email };
|
return { id: user.id, name: user.name, email: user.email };
|
||||||
},
|
},
|
||||||
|
|||||||
+4
-2
@@ -1,7 +1,9 @@
|
|||||||
{
|
{
|
||||||
"name": "wikipedia-game",
|
"name": "wikirush",
|
||||||
"version": "0.1.0",
|
"version": "1.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
"author": "Jessy DAVID - https://jessy-david.dev",
|
||||||
|
"description": "WikiRush - Navigue entre les articles Wikipedia pour atteindre la cible en premier !",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "next dev",
|
"dev": "next dev",
|
||||||
"build": "next build",
|
"build": "next build",
|
||||||
|
|||||||
Reference in New Issue
Block a user