Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make tokens indexes unique #263

Open
nicolas-brousse opened this issue Nov 19, 2020 · 2 comments
Open

Make tokens indexes unique #263

nicolas-brousse opened this issue Nov 19, 2020 · 2 comments
Labels
bug Something isn't working to be implemented in v1 This issue or pull request will be resolved in the v1 rework, but has not yet been completed.

Comments

@nicolas-brousse
Copy link

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?

@joshbuker
Copy link
Member

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 joshbuker added the question Asking a question about Sorcery label Mar 9, 2021
@joshbuker joshbuker added the to be implemented in v1 This issue or pull request will be resolved in the v1 rework, but has not yet been completed. label Jun 5, 2021
@joshbuker
Copy link
Member

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 joshbuker added bug Something isn't working and removed question Asking a question about Sorcery labels Jun 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working to be implemented in v1 This issue or pull request will be resolved in the v1 rework, but has not yet been completed.
Projects
None yet
Development

No branches or pull requests

2 participants