Email Management 📧

For a user to be able to login they will need to set an email. It probably also has to be verified.

Changing the user's email

To change the email address of a user, you need to use the changeAndValidateEmail mutation. If the user has already added a password to his account, the password needs to be provided.

changeAndValidateEmail(newEmail: "example@email.address", password: "Rainbows123")

If this is the first time a user is changing their address and they have chosen the "magic login" scheme, you can also use the changeEmailMagically mutation to send a special mail, also logging the in when they open the link.

Verifying an email address

Upon the success of the changeAndValidateEmail mutation, an email will be sent to that address contraing a verification link. This will ensure that the user actually owns the address he used.

You can use the verified field of the User object, to make sure that the user actually verified their address and prompt him to do so if he didn't.

Resending a verification email

Links in verification links expire, or might get deleted somehow. To make sure a user can still verify their address, use the resendVerificationMail mutation.

resendVerificationMail: Boolean