sorcery
sorcery copied to clipboard
Make tokens indexes unique
I think token fields for reset_password
, user_activation
, brute_force
, magic_login
and remember_me
modules` should be unique.
Is there any reasons it is not?
Good question, I'll have to look into it further. As it is, the probability of collisions is rather low, and you can always modify the migration to make those fields unique restricted for your own app.
I'll look into this further for v1, and make the tokens unique assuming I don't run into whatever reason they were left as-is in v0. Considering we use it for find_by look-ups, you'd think that it would have been unique constrained the whole time.