correction du token lors du login
This commit is contained in:
BIN
.next/dev/cache/turbopack/23c46498/CURRENT
vendored
BIN
.next/dev/cache/turbopack/23c46498/CURRENT
vendored
Binary file not shown.
6
.next/dev/cache/turbopack/23c46498/LOG
vendored
6
.next/dev/cache/turbopack/23c46498/LOG
vendored
@@ -2120,3 +2120,9 @@ FAM | META SEQ | SST SEQ | RANGE
|
|||||||
0 | 00011435 | 00011434 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
|
0 | 00011435 | 00011434 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
|
||||||
1 | 00011436 | 00011432 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
|
1 | 00011436 | 00011432 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
|
||||||
2 | 00011437 | 00011433 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
|
2 | 00011437 | 00011433 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
|
||||||
|
Time 2026-03-04T14:12:37.6626717Z
|
||||||
|
Commit 00012057 4 keys in 16ms 349µs 100ns
|
||||||
|
FAM | META SEQ | SST SEQ | RANGE
|
||||||
|
0 | 00012055 | 00012054 SST | [=======================================================================] | 3aefa6fd5cf2deb4-f42f94001fcb5351 (0 MiB, fresh)
|
||||||
|
1 | 00012056 | 00012052 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
|
||||||
|
2 | 00012057 | 00012053 SST | O | 3ffdfb3b7d50fcf1-3ffdfb3b7d50fcf1 (0 MiB, fresh)
|
||||||
|
|||||||
@@ -1,15 +1,13 @@
|
|||||||
'use client';
|
import { auth } from "@/lib/auth";
|
||||||
|
import { redirect } from "next/navigation";
|
||||||
|
import LoginClient from "@/components/LoginClient";
|
||||||
|
|
||||||
import LoginPage from '@/components/LoginPage';
|
export default async function Login() {
|
||||||
import { useRouter } from 'next/navigation';
|
const session = await auth();
|
||||||
|
|
||||||
export default function Login() {
|
if (session?.user) {
|
||||||
const router = useRouter();
|
redirect("/dashboard");
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return <LoginClient />;
|
||||||
<LoginPage
|
|
||||||
onSuccess={() => router.push('/dashboard')}
|
|
||||||
onRegister={() => router.push('/signup')}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
'use client';
|
import { auth } from "@/lib/auth";
|
||||||
|
import { redirect } from "next/navigation";
|
||||||
|
import HomeClient from "@/components/HomeClient";
|
||||||
|
|
||||||
import LandingPage from '@/components/LandingPage';
|
export default async function Home() {
|
||||||
import { useRouter } from 'next/navigation';
|
const session = await auth();
|
||||||
|
|
||||||
export default function Home() {
|
if (session?.user) {
|
||||||
const router = useRouter();
|
redirect("/dashboard");
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return <HomeClient />;
|
||||||
<LandingPage
|
|
||||||
onLogin={() => router.push('/login')}
|
|
||||||
onFeatures={() => router.push('/features')}
|
|
||||||
onPricing={() => router.push('/pricing')}
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,13 @@
|
|||||||
'use client';
|
import { auth } from "@/lib/auth";
|
||||||
|
import { redirect } from "next/navigation";
|
||||||
|
import SignupClient from "@/components/SignupClient";
|
||||||
|
|
||||||
import AuthPage from '@/components/AuthPage';
|
export default async function Signup() {
|
||||||
import { useRouter } from 'next/navigation';
|
const session = await auth();
|
||||||
|
|
||||||
export default function Signup() {
|
if (session?.user) {
|
||||||
const router = useRouter();
|
redirect("/dashboard");
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return <SignupClient />;
|
||||||
<AuthPage
|
|
||||||
onBack={() => router.push('/')}
|
|
||||||
onSuccess={() => router.push('/dashboard')}
|
|
||||||
initialMode="signup"
|
|
||||||
/>
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
16
src/components/HomeClient.tsx
Normal file
16
src/components/HomeClient.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import LandingPage from '@/components/LandingPage';
|
||||||
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
|
export default function HomeClient() {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<LandingPage
|
||||||
|
onLogin={() => router.push('/login')}
|
||||||
|
onFeatures={() => router.push('/features')}
|
||||||
|
onPricing={() => router.push('/pricing')}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
15
src/components/LoginClient.tsx
Normal file
15
src/components/LoginClient.tsx
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import LoginPage from '@/components/LoginPage';
|
||||||
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
|
export default function LoginClient() {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<LoginPage
|
||||||
|
onSuccess={() => router.push('/dashboard')}
|
||||||
|
onRegister={() => router.push('/signup')}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
16
src/components/SignupClient.tsx
Normal file
16
src/components/SignupClient.tsx
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
'use client';
|
||||||
|
|
||||||
|
import AuthPage from '@/components/AuthPage';
|
||||||
|
import { useRouter } from 'next/navigation';
|
||||||
|
|
||||||
|
export default function SignupClient() {
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AuthPage
|
||||||
|
onBack={() => router.push('/')}
|
||||||
|
onSuccess={() => router.push('/dashboard')}
|
||||||
|
initialMode="signup"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -37,7 +37,9 @@ export const { handlers, signIn, signOut, auth } = NextAuth({
|
|||||||
],
|
],
|
||||||
session: {
|
session: {
|
||||||
strategy: 'jwt',
|
strategy: 'jwt',
|
||||||
|
maxAge: 30 * 24 * 60 * 60, // 30 days
|
||||||
},
|
},
|
||||||
|
secret: process.env.AUTH_SECRET || 'fallback_secret_for_development_purposes_only',
|
||||||
callbacks: {
|
callbacks: {
|
||||||
async jwt({ token, user }) {
|
async jwt({ token, user }) {
|
||||||
if (user) {
|
if (user) {
|
||||||
|
|||||||
Reference in New Issue
Block a user