japacible / commission-me

Platform for commissioners and buyers to connect and finalize sales.
http://commissionme.herokuapp.com/
4 stars 3 forks source link

Unable to log in/create accounts on master and wip-commissions #237

Closed kcorman closed 10 years ago

kcorman commented 10 years ago

Anyone else getting this? I just pulled both branches and tried:

Similarly

quanc commented 10 years ago

Yeah, I think we confirmed last night that this is a problem.

japacible commented 10 years ago

Upon reverting ff9c28c5636430bfef134b03b3e923fe254ad526, I was able to create a new account or log in to an existing one. I can't dig around to figure out what happened in that last commit, but perhaps you would be knowledgeable about that, @kcorman

Also, I didn't commit the revert.

kcorman commented 10 years ago

For some reason I thought I wrote something about this in the last hour, but I guess I just meant to and didn't. The issue has to do with the fact that a User does not always have a password defined, just a password digest. Consequently verifying stuff about the password will cause failures. When we authenticate by logging in, we're not actually setting the user's password, but rather using some BCrypt magic to compare the posted password with the user's password_digest.

So if we could figure out how to only enforce validations on password updates that would work but I spent a good half hour and couldn't figure it out. (Obvious things such as :on => create, :on => update) seemed to not work).

I think the master branch currently has the validation commented out.

On Sat, Dec 7, 2013 at 6:33 PM, Jennifer Apacible notifications@github.comwrote:

Upon reverting ff9c28chttps://github.com/japacible/commission-me/commit/ff9c28c5636430bfef134b03b3e923fe254ad526, I was able to create a new account or log in to an existing one. I can't dig around to figure out what happened in that last commit, but perhaps you would be knowledgeable about that, @kcorman https://github.com/kcorman

— Reply to this email directly or view it on GitHubhttps://github.com/japacible/commission-me/issues/237#issuecomment-30073415 .

quanc commented 10 years ago

What is the status of this? Is the fact that validation is commented out causing a problem?

kcorman commented 10 years ago

Actually the fact that the validation is commented out means everything works except for password validation. So you can log in and create accounts but there are no restrictions on passwords.

On Sat, Dec 7, 2013 at 9:32 PM, Christina Quan notifications@github.comwrote:

What is the status of this? Is the fact that validation is commented out causing a problem?

— Reply to this email directly or view it on GitHubhttps://github.com/japacible/commission-me/issues/237#issuecomment-30075501 .

quanc commented 10 years ago

It looks like logging in/signing up works now though. Should we put the password restriction as a different issue?

kcorman commented 10 years ago

Yeah probably