mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-08-15 12:05:19 +08:00
allow to enable/disable email sigin via env variable
This commit is contained in:
@@ -165,6 +165,10 @@ export default function auth(req: NextApiRequest, res: NextApiResponse) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (account.provider === "email" && !boolean(process.env.NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
const captcha = req.body.captcha;
|
||||
|
||||
const res = await checkCaptcha(captcha, getIp(req));
|
||||
|
||||
Reference in New Issue
Block a user