sorcery icon indicating copy to clipboard operation
sorcery copied to clipboard

Make tokens indexes unique

Open nicolas-brousse opened this issue 4 years ago • 2 comments

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?

nicolas-brousse avatar Nov 19 '20 16:11 nicolas-brousse

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.

joshbuker avatar Nov 29 '20 18:11 joshbuker

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.

joshbuker avatar Jun 05 '21 00:06 joshbuker