mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-09-10 11:41:04 +08:00
allow to enable/disable email signin captcha via env variable
This commit is contained in:
@@ -161,7 +161,7 @@ export default function auth(req: NextApiRequest, res: NextApiResponse) {
|
||||
callbacks: {
|
||||
...authOptions.callbacks,
|
||||
async signIn({ account }) {
|
||||
if (account.provider !== "email") {
|
||||
if (account.provider !== "email" || !boolean(process.env.NEXT_PUBLIC_ENABLE_EMAIL_SIGNIN_CAPTCHA)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user