Skip to content

Commit 669e360

Browse files
authored
Fix email signin captcha 2 (#1637)
* do not check captcha when verify email
1 parent d131194 commit 669e360

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

website/src/pages/api/auth/[...nextauth].ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -210,9 +210,9 @@ export default function auth(req: NextApiRequest, res: NextApiResponse) {
210210
callbacks: {
211211
...authOptions.callbacks,
212212
async signIn({ account }) {
213-
const isVerifyEmail = req.url ? req.url.includes("/api/auth/signin/email") : false;
213+
const isVerifyEmail = req.url ? req.url.includes("/api/auth/callback/email") : false;
214214

215-
if (account.provider !== "email" || !boolean(process.env.ENABLE_EMAIL_SIGNIN_CAPTCHA) || !isVerifyEmail) {
215+
if (account.provider !== "email" || !boolean(process.env.ENABLE_EMAIL_SIGNIN_CAPTCHA) || isVerifyEmail) {
216216
return true;
217217
}
218218

0 commit comments

Comments
 (0)