From 7d8abb6f61a25d8d6e76ade83400fe01a4be0e25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Yusuf=20Akg=C3=BCl?= <s86116@bht-berlin.de> Date: Tue, 30 May 2023 18:34:02 +0200 Subject: [PATCH] cleanup --- app/api/auth/[...nextauth]/route.ts | 5 +---- components/auth-login-form.tsx | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/app/api/auth/[...nextauth]/route.ts b/app/api/auth/[...nextauth]/route.ts index 3303273..ca23bf0 100644 --- a/app/api/auth/[...nextauth]/route.ts +++ b/app/api/auth/[...nextauth]/route.ts @@ -46,7 +46,6 @@ export const authOptions: NextAuthOptions = { id: user.id + '', email: user.email, name: user.name, - randomKey: 'Hey cool' } } }) @@ -59,7 +58,6 @@ export const authOptions: NextAuthOptions = { user: { ...session.user, id: token.id, - randomKey: token.randomKey } } }, @@ -70,7 +68,6 @@ export const authOptions: NextAuthOptions = { return { ...token, id: u.id, - randomKey: u.randomKey } } return token @@ -79,4 +76,4 @@ export const authOptions: NextAuthOptions = { } const handler = NextAuth(authOptions) -export { handler as GET, handler as POST } \ No newline at end of file +export { handler as GET, handler as POST } diff --git a/components/auth-login-form.tsx b/components/auth-login-form.tsx index f932027..0b430e2 100644 --- a/components/auth-login-form.tsx +++ b/components/auth-login-form.tsx @@ -11,7 +11,7 @@ import { useState } from 'react' export const LoginForm = () => { const router = useRouter() const searchParams = useSearchParams() - const callbackUrl = searchParams.get('callbackUrl') || '/dashboard' + const callbackUrl = searchParams.get('callbackUrl') || '/home' const [email, setEmail] = useState('') const [password, setPassword] = useState('') const [error, setError] = useState('') -- GitLab