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 |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The database structure at https://v3.lucia-auth.com/guides/email-and-password/email-verification-codes is like:
Why is
email
added even thoughuser_id
is still there that I can do join & get the email if I wanted too? Theemail
has 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?
Beta Was this translation helpful? Give feedback.
All reactions