airblade / quo_vadis

Multifactor authentication for Rails (7 and 6).
MIT License
33 stars 4 forks source link

Clicking the change password link always says "Sorry, this link isn't valid anymore." #6

Closed jruz closed 12 years ago

jruz commented 12 years ago

Hi,

Thanks for your gem!

Im having some trouble setting this up, it doesn't matter how fast I click the link always gives me that error.

airblade commented 12 years ago

What does the link's URL look like?

And in your database, before clicking the link, what values does your user/person/whoever record have for token and token_created_at?

jruz commented 12 years ago

Thanks for your fast reply,

email url: /sign-in/change-password/rM4YXuImQFk5Ngzz

Thats the problem token and token_created_at are blank

airblade commented 12 years ago

The token info is generated here and then here.

The only way you can receive the change-password email is if the code goes down that path. So the user.generate_token method must be being called. I can't think why it wouldn't be working. All I can suggest is you put some debugging statements in your installed version of QV and see where it's going wrong.

jruz commented 12 years ago

Thanks a lot for your help, It was something that has todo with my user, I tested with other users and it works. I reentered my user data and now works. Thanks!