twilson63/express-couchUser — pull request #9 by the-t-in-rtf (2014-03-21 14:48:01+00:00)
Title: Implemented user email validation (optionally configurable) and updated documentation...

https://github.com/twilson63/express-couchUser/issues/3

Although /api/user/verify was mentioned in the documentation, it wasn't implemented. I implemented it using a method similar to the password reset code functionality. In short:

# Verification can be required by setting config.verification in your app's settings.
# If verification is required, only users who have a verified date will be let in.
# If verification is required, when an account is created, a verification email will be sent with a verification code.
# A user can click the link provided in the email to verify their account.
# The original POST route used to request verification can be used to implement a "resend" form if desired.

I did deviate slightly from the original documented API, as I wanted a single link that could be clicked from email and not a POST form. The POST form is now reserved for requesting verification, and the GET for completing the process.