Fix all NextAuth v4 imports across codebase

This commit is contained in:
2025-12-02 14:03:13 +00:00
parent 2f7bc4fe8e
commit d7297248c1
11 changed files with 48 additions and 39 deletions

View File

@@ -3,7 +3,7 @@
import { prisma } from './db'
import bcrypt from 'bcryptjs'
import { z } from 'zod'
import { signIn, signOut } from '@/auth'
import { signIn, signOut } from 'next-auth/react'
import { checkRateLimit, resetRateLimit, LOGIN_RATE_LIMIT, REGISTER_RATE_LIMIT } from './rate-limit'
import { headers } from 'next/headers'
import { getClientIdentifier } from './rate-limit'
@@ -196,7 +196,7 @@ export async function logoutUser(): Promise<void> {
export async function getCurrentSession() {
try {
const { auth } = await import('@/auth')
const session = await auth()
const session = await getServerSession(authOptions)
return session
} catch (error) {
console.error('Session retrieval error:', error)