Merge branch 'dstroot-reset'

* dstroot-reset: (27 commits)
  Added comments to User model on instance methods and mongoose middleware.
  Updated login template
  Add success flash notification on successful password reset
  Forgot password token changed to hex instead of base64 to avoid having slashes in the url
  Merged first and second waterfall steps into one, added var secrets = require('../config/secrets');, and mongoose query now returns a user object instead of an array
  Converted reset controller from eventemitter to async.waterfall.
  Added callback to async.waterfall for error handling via express middleware
  Renamed forgot password link
  Updated reset password template
  Cleaned up and refactored reset password template
  Updated schema's default values for password token and expires fields
  Update flash message on successful forgot password request
  Update contributing section
  Update POST /forgot description.
  Refactor Forgot controller
  Converted workflow/eventemitter code to async.waterfall
  Update error flash message, redirect to /forgot if no reset token is found or if it has expired
  Updated expiration of password token to 1hr, updated flash message when email is sent with password recovery instructions.
  Removed user _id from reset route. Use only token value. It's random enough that you don't need to include user id as well.
  Updated email template text, removed token salting, changed token to base64 (24bit)
  ...
This commit is contained in:
Sahat Yalkabov
2014-02-18 04:07:08 -05:00
10 changed files with 238 additions and 8 deletions

View File

@@ -959,7 +959,7 @@ TODO
Contributing
------------
If something is unclear, confusing, or needs to be refactored, please let me know. Pull requests are always welcome, but due to the opinionated nature of this project, I cannot accept every pull request. Please open an issue before submitting a pull request. This project uses [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) with a few exceptions.
If something is unclear, confusing, or needs to be refactored, please let me know. Pull requests are always welcome, but due to the opinionated nature of this project, I cannot accept every pull request. Please open an issue before submitting a pull request. This project uses [Airbnb JavaScript Style Guide](https://github.com/airbnb/javascript) with a few minor exceptions. If you are submitting a pull request that involves Jade templates, please make sure you are using *spaces*, not tabs.
License
-------