5 Commits

Author SHA1 Message Date
roschaefer
276ea79e8f Update prettier to v2 2020-03-24 21:11:11 +01:00
mattwr18
d39e702e70 Update exisitingEmailAddress 2019-12-11 18:19:40 +01:00
roschaefer
61a8914989 Always normalize email in backend 2019-11-05 00:06:15 +01:00
roschaefer
6ffafff288 fix: ensure no other user owns a new email address
`BELONGS_TO` means a user owns an email address. `PRIMARY_EMAIL` means a
user authenticates with that email.

So right now, you get a proper error message if you try to change your
email back to your old email address (because you own it already).

I will make sure to delete the old email so this will be no problem
anymore. But maybe in the future we might have multiple email addresses
per user and then it makes a big difference to use `PRIMARY_EMAIL` or
`BELONGS_TO`.
2019-10-02 01:31:23 +02:00
roschaefer
8c13234af9 Handle edge case
It might be that people try to register email addresses that they don't own. Then if the actual owner tries to add this email address, she should not get a unique constraint violation. Instead the email will be re-used.

Is this a security issue? Because we re-use the nonce? 🤔
2019-10-02 00:54:01 +02:00