tisn.app
tisn.app copied to clipboard
Documents with `emailConfirmed: false` and a non-null `emailConfirmedAt`
Describe the bug
There are some documents on the database with a non-null emailConfirmedAt
attribute but with emailConfirmed: false
.
To Reproduce Not sure why it happens, it needs to be investigated.
Expected behavior
If the email is not confirmed (i.e. if emailConfirmed: false
), emailConfirmedAt
must be null
.
I don't think it's possible for emailConfirmedAt to be null as it is described in Schema
emailConfirmedAt: { type: Date },
Actually, emailConfirmedAt
is never null
per se, but unless a user's email is confirmed, it isn't present on the corresponding document. The bug here is that there are users with an emailConfirmedAt
value that have an emailConfirmed
value of false
, which shouldn't happen.
If you'd like to dig deeper into this, let me know and I'll assign the issue to you! 🙂