Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conditional email verification not working in some scenarios #8839

Closed
4 tasks done
mtrezza opened this issue Dec 19, 2023 · 4 comments · Fixed by #8838
Closed
4 tasks done

Conditional email verification not working in some scenarios #8839

mtrezza opened this issue Dec 19, 2023 · 4 comments · Fixed by #8838
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version

Comments

@mtrezza
Copy link
Member

mtrezza commented Dec 19, 2023

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
Copy link

parse-github-assistant bot commented Dec 19, 2023

Thanks for opening this issue!

  • 🚀 You can help us to fix this issue faster by opening a pull request with a failing test. See our Contribution Guide for how to make a pull request, or read our New Contributor's Guide if this is your first time contributing.

@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0-alpha.3

@parseplatformorg parseplatformorg added the state:released-alpha Released as alpha version label Dec 26, 2023
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0-beta.1

@parseplatformorg parseplatformorg added the state:released-beta Released as beta version label Mar 19, 2024
@parseplatformorg
Copy link
Contributor

🎉 This change has been released in version 7.0.0

@parseplatformorg parseplatformorg added the state:released Released as stable version label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
state:released Released as stable version state:released-alpha Released as alpha version state:released-beta Released as beta version
Projects
None yet
2 participants