Skip to content

Conditional email verification not working in some scenarios #8839

Description

@mtrezza

New Issue Checklist

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions