Skip to content

Loopback PUT Request turn emailVerified to "false" #3059

Closed

Description

@ishansan38

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)

Activity

  1. rusackas commented on Jan 3, 2017

    @rusackas

    Experiencing the same problem here. We have an admin tool that sets emailVerified to true via a pot request, but it stopped working.

  2. benbrown commented on Jan 4, 2017

    @benbrown

    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!

  3. gaecer commented on Jan 5, 2017

    @gaecer

    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

  4. rusackas commented on Jan 5, 2017

    @rusackas

    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.

  5. davidcheung commented on Jan 10, 2017

    @davidcheung
    Contributor

    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.

  6. gaecer commented on Jan 10, 2017

    @gaecer
  7. dancingshell commented on Jan 11, 2017

    @dancingshell

    tl;dr... was/is this an issue for loopback 3.x.x?

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions