Why is email added again on emailVerificationCodeTable? It breaks database normalization form.
#1357
Closed
deadcoder0904
started this conversation in
General
Replies: 1 comment 6 replies
|
It limits the token to a single email. This makes sure someone can't register a valid email, change it to an invalid one, and verify their email. I guess you could also delete all user tokens when they change their email, but it's an extra safety measure |
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
The database structure at https://v3.lucia-auth.com/guides/email-and-password/email-verification-codes is like:
Why is
emailadded even thoughuser_idis still there that I can do join & get the email if I wanted too? Theemailhas to be kept tracked in 2 locations this way and it breaks the database normalization form. Either 1nf, 2nf or 3nf idk. I'm not a database expert.But this isn't need at all. Am I wrong?
All reactions