-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
parse-server 2.8.1: Cannot login after changing user password #4790
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
Comments
Please provide the logs when running with VERBOSE=1 of the whole process of singing up, logging in, changing password etc... |
Is the old password still valid? |
I can't try because I could not remember the old password. I test against several other accounts and it seems that this problem affect accounts that are created long ago such as April 2015 (they were migrated from parse.com to ParseServer). The recent accounts is working fine after password reset. Is this related to the migration of revokable session token (in 2017) or the User.authData and Session data? I am going to sleep now and will be back online in 8 hours time. Thanks Mr Vilmart for checking on this. |
Perhaps those account are still on revocable sessions and you’re hitting a nasty bug. Any chance you can get a look at the object in the DB and check if the sessionToken is still an old one ? |
I used mLab to query the _Session table. I could not find session for the failed to logon users. This is the _user record for the account that I could not login. Does it contain any clue on the sessionToken type? |
Legacy session tokens have the token on he user object; this is what you see there. |
Thanks Florent. Was there any recent deprecation of logic in this area? What are the ways that I can adopt to solve this problem? |
parse-server never supported old session tokens, further investigation need to be done to reproduce the issue and perhaps find a workaround. I have trouble also understanding why login information would not work after resetting the password. |
Thanks. Apparently, for those old user account, session token is never generated for user login. I can help to test/reproduce if you need, just let me know. May I trouble you to delete the log file that I submitted earlier? I deleted the link in this thread but could not delete the file. I can email you the actual link if you need to link to delete it. |
I don’t believe I have access to the log file myself. I can see the comment isn’t there anymore. As for the reproduction, that would be very nice to have an edge to edge test that simulates this password exchange / replacement flow. This may help us understand the issue a bit more in depth. There are many tests for the ‘reset password’ emails as well as for legacy session tokens. Perhaps there’s something there that’s problematic |
I have the same problem, just after updating parse server logging in with my old password returned invalid username/password error. Then i have changed password, logged in. After some time logged out and again i cant login. In all cases the password was the same old password. |
I work around this problem by manually deleting the old "_User" record and use app GUI to "signup" for new user account. The new user account is having different data structure and don't have the password reset problem. |
Interesting! I’ll be able to investigate from there with the old user data then! |
The full old user object is the one that was previously posted? |
Yes, the old user object is the one that I posted with "_created_at" time stamp as 2015-01-26, having sessionToken inside the _user object. I basically deleted account for username "Nebi" and use the iOS App to sign up a new account for username "Nebi" again. I noticed that the new structure embeds the ACL. Would this make a difference? |
This is very likely that this is the issues |
Same issue here. We rolled back to fix it. |
@nebitrams I'll try to work on a fix today, if I have time. |
The issues originate in the fact that now, we let the masterKey lock the users out. A locked out user is a user where the ACL is either not set or completely empty. Those old users, have the ACL completely empty as seen in the object that @nebitrams shared above. How many of your users are affected by this issue? You can find out by checking the number of users with neither _rperm nor _wperm nor _acl set on them. |
We have a total of 727995 (legacy) users with no _acl nor _rperm nor _wperm. |
Ok, good to know, i’ll Push a workaround then so they are not locked out upon re-login. If needed |
Thanks Florent. I don't have that many legacy users. I do not rollback and can wait for the patch. |
* Adds test to reproduce issue #4790 * Attempt to allow failure on node STABLE * Use new format for apt packages
@nebitrams @alexblack @saulogt the latest branch should be up to date, can you let me know if it fixes the issue for you? You can use in your package.json |
I see your instruction now. I will try it in 16 hours time. My package.json was originally form the parse-server-example. Can I just change the repository.url and do a npm update? { |
As mentioned above, in your package.json, replace the version with the link pointing to this repository’s latest branch: https://github.com/Parse-community/Parse-server#latest And run npm install |
Having the same issues here. Not sure if it is related to users who changed their password, but possible. Rolling back to parse-server 2.7.4 fixed the problem for us. |
I believe I still have the old code. Sorry about this but need to go now. Resume tomorrow. line 132 onwards. |
Yes this is still the old code. Did you run Also you can delete perhaps the node_modules folder and re-reun npm install. |
@flovilmart |
what command did you run exactly? |
The command you put in the last comment: |
do you have a package-lock.json? In package.json, is the line specifying the parse-server dependency pointing to the one I provided your, if not can you ensure it is? Lastly, you can remove the package-lock.json as well as the node_modules folder and re-run |
I ran the npm install --save and see many errors too. I also checked that the UserRouter.js file not updated. Can I manually add the new line into UserRouter.js? |
You can but I discourage it as besides locally you won't be able to run.
What version of node are you running? Also you see errors, but the logs you're showing me are not errors at all. |
npm 5.5.1 I see package-lock.json. I removed it and trying again. |
node 9 is unsupported, can you use node 8.10+. while this should work properly with node 9, one is never too sure. Also, if you believe npm install fails, can you post the whole logs in a gist please? |
I removed package-lock.json and node_modules folder and re-run "npm install". The npm is successful but the UserRouter.js is still the old file. Is my package.json correct? { |
No it isn’t, uou’re pointing parse-server to ^2.8.1, and not the proper URL. |
I edited UserRouter.js manually and the revised logic works for user records created in 2015. verbose: REQUEST for [GET] /parse/login: { verbose: RESPONSE from [GET] /parse/login: { |
@nebitrams ok good to know. But you should not have done that as when you'll deploy to heroku or somewhere else, this won't work anymore. |
Thanks @flovilmart for fixing this issue. |
This issue still persists in 2.8.2 Logging in causes error invalid username/password for users from previous version. |
@lxknvlk can you open a new issue please, with providing verbose logs, as well as any relevant information that would help isolating the issue? |
@flovilmart ok |
@flovilmart Why open a new issue if the issue wasn't resolved? |
It’s been resolved according to the person who opened it. So, I’m not sure what to say, open a new issue please, with filling all required informations. |
The same problem here. |
Can you try with 2.8.2 on node 8+ please? |
I will ask my hosting provider (nodechef.com) to get it up and running, because now it crashes then I try to run it on node 8. |
@artua so please reach out to nodechef support. |
@flovilmart I tested 2.8.2 in heroku and it works well. I am using these node and npm version. remote: Downloading and installing node 10.4.0... |
Awesome! Good to hear! |
…ity#4795) * Adds test to reproduce issue parse-community#4790 * Attempt to allow failure on node STABLE * Use new format for apt packages
Issue Description
These is error deployment error (see log showing Kerberos compilation error) when I deploy to Heroku. The application works fine in all expects except that I cannot login after changing user password.
Steps to reproduce
error: Error generating response. ParseError { code: 101, message: 'Invalid username/password.' } code=101, message=Invalid username/password.
error: Invalid username/password. code=101, message=Invalid username/password.
It works after I rollback to previous version in heroku with parse-server 2.7.4
Expected Results
I should be able to login after changing password.
Actual Outcome
I cannot login.
Environment Setup
Server
Database
Logs/Trace
This is the heroku deployment error.
-----> Node.js app detected
-----> Creating runtime environment
-----> Installing binaries
engines.node (package.json): >=4.3
engines.npm (package.json): unspecified (use default)
-----> Restoring cache
Skipping cache restore (new-signature)
-----> Building dependencies
Installing node modules (package.json)
The text was updated successfully, but these errors were encountered: