fix: Parse Server option emailVerifyTokenReuseIfValid: true generates new token on every email verification request (#8885)

This commit is contained in:
Manuel
2024-01-14 01:37:20 +01:00
committed by GitHub
parent 4aba66c620
commit 0023ce448a
3 changed files with 8 additions and 8 deletions

View File

@@ -476,7 +476,7 @@ export class UsersRouter extends ClassesRouter {
);
}
const results = await req.config.database.find('_User', { email: email });
const results = await req.config.database.find('_User', { email: email }, {}, Auth.maintenance(req.config));
if (!results.length || results.length < 1) {
throw new Parse.Error(Parse.Error.EMAIL_NOT_FOUND, `No user found with email ${email}`);
}