Upgrade to NextAuth v5

This commit is contained in:
2024-06-18 11:10:30 +04:00
parent 5491d996b8
commit 157951b10e
9 changed files with 64 additions and 90 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
import {getServerSession} from 'next-auth'
import {createDirectus, rest, readItems} from '@directus/sdk'
import Container from '@mui/material/Container'
import Box from '@mui/material/Box'
import Typography from '@mui/material/Typography'
import {options} from './api/auth/[...nextauth]/options.js'
import {auth} from '../auth.js'
import Konstitisyon from '@/components/konstitisyon/index.js'
import Footer from '@/components/footer.js'
import Sign from '@/components/session/sign.js'
@@ -46,7 +45,7 @@ async function getData() {
}
export default async function Page() {
const session = await getServerSession(options)
const session = await auth()
const {titres, articles} = await getData()
return (