This commit is contained in:
root
2025-12-20 19:00:42 +01:00
parent 9871289bfb
commit e1a0966dee
23 changed files with 1878 additions and 48 deletions

View File

@@ -0,0 +1,18 @@
import { NextResponse } from 'next/server'
// POST /api/auth/logout - Logout and clear session
export async function POST() {
const response = NextResponse.json({ success: true }, { status: 200 })
// Clear the session cookie
response.cookies.set('buyer_id', '', {
httpOnly: true,
secure: process.env.NODE_ENV === 'production',
sameSite: 'lax',
maxAge: 0,
path: '/',
})
return response
}