bcrypt is a password hashing function based on the Blowfish cipher, developed in 1999.
Never, EVER store plain-text user passwords in your database. Always encrypt. Read Storing user passwords securely: hashing, salting, and bcrypt for a great explanation.
Optimized bcrypt in plain JavaScript with zero dependencies
How to get started:
npm install bcryptjs
var bcrypt = require('bcryptjs');
var salt = bcrypt.genSaltSync(10); // parameter is the number of rounds to use
var hash = bcrypt.hashSync('plain_text_password', salt);
Meganote: Source
Meganote-server: Source
User authentication and persistence in Meganote
If user is signed out, display a link to ‘Sign Up’ in the navbar
If user is signed in, display a link to ‘Sign Out’ instead (and have it work). Also, display the current user’s name in the navbar
Use custom directives to fulfill the base requirements
Create a working profile page where you can update a user’s profile