mirror of
https://github.com/gethomepage/homepage.git
synced 2026-09-27 14:31:17 -07:00
Prevent getProviders issue with auth disabled
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user