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

Do we need uniqueness index for encrypted_otp_secret_key? #206

Open
airled opened this issue Feb 8, 2022 · 0 comments
Open

Do we need uniqueness index for encrypted_otp_secret_key? #206

airled opened this issue Feb 8, 2022 · 0 comments

Comments

@airled
Copy link

airled commented Feb 8, 2022

The gem automatically creates migration file with this index:

...
add_index :users, :encrypted_otp_secret_key, unique: true
...

It's not a big deal really. Just can't undestand why do we need it? Even if you create several users with same otp_secret_key, the salt and iv most likely be different for both of the users. So encrypted_otp_secret_key field will be different too. Seems like the index is pretty pointless. What do you think?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant