So when I create an account on my RoR app locally, and then push it to heroku with heroku db:push all is well. However, when I make my account an admin with User.find(5).toggle!(:admin) locally in the console and then push the db to heroku, I can no longer log into my account. I get an incorrect pw and email combo. Why is this?
So when I create an account on my RoR app locally, and then push
Share
I had this same problem with a tutorial.
When you update that admin user with toggle, it also updates the password salt based on the logic of the tutorial. As a result, the password you setup correctly won’t work. The solution is to check your password salting methods and change your salting logic or post it here.
You can check to see if this the case yourself by going into the heroku ruby console and recording the user’s salt prior to a toggle and post-toggle. If you have the same problem I had they will be different.