Fix all NextAuth v4 imports across codebase
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user