I would like to have my app send out a verification email when a user has registered. Current behaviour is that he is immediately (and automatically) logged in after registration. Whenever a user hits the registration button, I perform validation of the fields and call the 'Accounts.createUser' function. This works good. Note: am using a custom user authentication, not accounts-ui or useraccounts.
I would however prefer him to validate his email and only when this is successful, his account should be activated.
To achieve this I configured:
Accounts.config({
sendVerificationEmail: true
});
The idea would be that an email is sent to the user in the Accounts.createUser function. My app is effectively sending out a verification email in the form 'http://localhost:3000/verify-email/' but the registered user is again automatically logged in.
- Any ideas?
- I have a route configured for the verification. Should I set the "verified" parameter (in mongo) to true via code in the js file of the template?