Fix all NextAuth v4 imports across codebase
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { redirect } from 'next/navigation'
|
||||
import { auth } from '@/auth'
|
||||
import { getServerSession } from 'next-auth'
|
||||
import { authOptions } from '@/pages/api/auth/[...nextauth]'
|
||||
import { getUserProfile } from '@/lib/auth-actions'
|
||||
import ProfileForm from '@/components/ProfileForm'
|
||||
import PasswordChangeForm from '@/components/PasswordChangeForm'
|
||||
@@ -11,7 +12,7 @@ export const metadata = {
|
||||
}
|
||||
|
||||
export default async function ProfilePage() {
|
||||
const session = await auth()
|
||||
const session = await getServerSession(authOptions)
|
||||
|
||||
if (!session?.user?.id) {
|
||||
redirect('/auth/login')
|
||||
|
||||
Reference in New Issue
Block a user