Fix: use strict bool check for auth

This commit is contained in:
shamoon
2026-08-07 07:51:21 -07:00
parent 670d0a8e40
commit b33c88dba1
4 changed files with 17 additions and 3 deletions
+3 -1
View File
@@ -1,7 +1,9 @@
import { getToken } from "next-auth/jwt";
import { NextResponse } from "next/server";
const authEnabled = Boolean(process.env.HOMEPAGE_AUTH_ENABLED);
import { isAuthEnabled } from "utils/env";
const authEnabled = isAuthEnabled();
const authSecret = process.env.NEXTAUTH_SECRET || process.env.HOMEPAGE_AUTH_SECRET;
export async function middleware(req) {