refactor: migrate from MongoDB to SQLite, updating database schema and configuration for improved performance and simplicity

This commit is contained in:
Julien Froidefond
2025-10-24 15:11:29 +02:00
parent 07c6bae2c4
commit ac5fa85185
22 changed files with 278 additions and 219 deletions

View File

@@ -3,12 +3,14 @@ import { getToken } from "next-auth/jwt";
export async function getAuthSession(request: NextRequest) {
try {
const cookieName = process.env.NODE_ENV === "production"
? "__Secure-authjs.session-token"
: "authjs.session-token";
const token = await getToken({
req: request,
secret: process.env.NEXTAUTH_SECRET,
cookieName: process.env.NODE_ENV === "production"
? "__Secure-authjs.session-token"
: "authjs.session-token"
cookieName
});
if (!token) {