Closed
Description
New Issue Checklist
- I am not disclosing a vulnerability.
- I am not just asking a question.
- I have searched through existing issues.
- I can reproduce the issue with the latest version of Parse Server.
Issue Description
Conditional email verification with functions for verifyUserEmails
, preventLoginWithUnverifiedEmail
is not working in some scenarios. That is because verifyUserEmails
and preventLoginWithUnverifiedEmail
can be functions since #8425, but the Parse Server code has not been updated in all places. For example, in some places the value for verifyUserEmails
is still checked with if (this.config.verifyUserEmails) { ... }
which doesn't work if the Parse Server options is set to a function.
For example, this configuration works as expected on sign up and returns error HTTP 205 User email is not verified.
:
verifyUserEmails: async () => true,
preventLoginWithUnverifiedEmail: true,
preventSignupWithUnverifiedEmail: true,
But this configuration does not work as expected on sign up and instead returns HTTP 201 with the Parse.User object:
verifyUserEmails: async () => true,
preventLoginWithUnverifiedEmail: async () => true,
preventSignupWithUnverifiedEmail: true,
Environment
Server
- Parse Server version:
7.0.0-alpha.2