Loopback PUT Request turn emailVerified to "false"
Bug or feature request
- [ ] Bug
- [ ] Feature request
Description of feature (or steps to reproduce if bug)
I tried a Put request with Loopback Explorer - it turns emailVerified to false, and thats why I am unable to login user.
Link to sample repo to reproduce issue (if bug)
Expected result
Should remain True
Actual result (if bug)
Additional information (Node.js version, LoopBack version, etc)
Experiencing the same problem here. We have an admin tool that sets emailVerified to true via a pot request, but it stopped working.
This appears to be caused by a change in v2.36.2, which is attempting to set emailVerified to false when a user changes their email address.
This should ONLY happen when the email address actually changes, not ANY time a user record is modified!
It doesn't, this happen any change you do in the User's model. I've fixed it changing user.js at line 863: // return data.email != ctx.data.email; original return ctx.data.email && data.email != ctx.data.email; //fix
Temporary workaround for those in need: With any PUT to the User model, you can include the existing/current email address, and it will save everything else correctly without invalidating the email.
this bug should be fixed in #3053 or in (2.x) #3072, please ping me in this thread if issue persists to reopen. Closing now.
Tomorrow I'll check this update, thanks.
Il giorno mar 10 gen 2017 alle ore 22:07 David Cheung < [email protected]> ha scritto:
Closed #3059 https://github.com/strongloop/loopback/issues/3059.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/strongloop/loopback/issues/3059#event-918175775, or mute the thread https://github.com/notifications/unsubscribe-auth/ANKEvNSDlThnEAZhdNo3mY-DAb7ZlpI4ks5rQ_L1gaJpZM4LYBsP .
-- {"name":"Gaetano Cerniglia", "email":"[email protected]", "skype":"gaetano.cerniglia", "tel":"3458161655"}
tl;dr... was/is this an issue for loopback 3.x.x?