Skip to content

emailVerified issue during User update #3689

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

Closed
medispanu opened this issue Apr 4, 2017 · 3 comments
Closed

emailVerified issue during User update #3689

medispanu opened this issue Apr 4, 2017 · 3 comments

Comments

@medispanu
Copy link

Issue Description

When I update a User object, the field verifiedEmail is forced to false even though setted to false

Steps to reproduce

  • my configuration
    verifyUserEmails: true,
    emailVerifyTokenValidityDuration: 2 * 60 * 60, // in seconds (2 hours = 7200 seconds)
    preventLoginWithUnverifiedEmail: true,

-It's not present any configuration r function in cloud main.js file

  • Update a existing user with parse node library

                                 var query = new Parse.Query(Parse.User);
                                 query.equalTo("icareId", farmaUser.get('icareId'));
                                 query.find().then(utente => {
                                  utente = utente[0];
                                  console.log('  Farma user ' + utente.get('icareId') + ' is updating');
    
                                  utente.set("icareId", farmaUser.get('icareId'));
                                  utente.set("username", farmaUser.get('username'));
                                  utente.set("email", farmaUser.get("email"));
                                  utente.set("pharmacy", farmaUser.get('pharmacy'));
                                  utente.set("name", farmaUser.get('name'));
                                  utente.set("surname", farmaUser.get('surname'));
                                  utente.set("phone", farmaUser.get('phone'));
                                  utente.set("birthday", farmaUser.get('birthday'));
                                  utente.set("sex", farmaUser.get('sex'));
                                  utente.save();
    

Expected Results

The value of emailVerified field must remain to old value

Actual Outcome

The value of emailVerified field changes to false value and verification email is sent.

Environment Setup

  • Server

    • parse-server version 2.3.7 or 2.3.1
    • Operating System: Ubuntu
    • Hardware: Linux Server
    • Localhost
  • Database

    • MongoDB version: 2.4.9-1ubuntu2
    • Storage engine: MongoDB
    • Hardware: Linux Server
    • Localhost

Logs/Trace

Include all relevant logs. You can turn on additional logging by configuring VERBOSE=1 in your environment.

@code-K
Copy link

code-K commented Apr 22, 2017

Hi @medispanu ,

I'm experiencing the exact same issue! Everytime the user object will be re-saved. Even if the "email" field did NOT change, it triggers a ne emailVerification...

Do you know any solutions or short workarounds to this I could implement?

Thanks much for feedback and best regards,
Christian

@junal
Copy link

junal commented Sep 28, 2017

@code-K @medispanu Having exact same issue for FB login. Did you find any solution?

@medispanu
Copy link
Author

medispanu commented Sep 28, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants