Skip to content

canary: race condition when signing up? #567

@eikaramba

Description

@eikaramba

On a fresh checkout of the canary branch i experience the following problem:

if i sign up locally the user is created, however on the client side a /user/me call follows afterwards, this call fails as the exports.me endpoint on the server does not find the user(User.findOneAsync returns a null user object). If i try to login again manually it works (because some time has passed). For me this means, that the exports.create method for a user seems to return the token too early, somehow the user is not really created already so that the subsequent authentication call fails. I changed the newUser.saveAsync() to newUser.save back --> this works for now.

Also i noted another problem:

  • for /index and /me "-hashedPassword" is still used to remove the password, however this field is now "password" so this needs to be changed, otherwise the password is send to the client!

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