Prevent getProviders issue with auth disabled

This commit is contained in:
shamoon
2026-08-07 08:45:38 -07:00
parent c8690f64da
commit e8f94bd873
2 changed files with 12 additions and 12 deletions
+1 -4
View File
@@ -155,10 +155,7 @@ const nextAuthHandler = NextAuth(authOptions);
export default async function handler(req, res) {
// Just pass empty session if auth not enabled
if (!authEnabled) {
if (req.query.nextauth?.[0] === "session") {
return res.status(200).json({});
}
return res.status(404).end("Not Found");
return res.status(200).json({});
}
return nextAuthHandler(req, res);