diff options
| author | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-24 06:00:23 +0000 |
|---|---|---|
| committer | kumar <kumar.damani@mail.utoronto.ca> | 2016-07-24 06:00:23 +0000 |
| commit | e83ad0a7931611822f49f84bf21a204df1de8eb6 (patch) | |
| tree | fab19a339d4419404c2d69f2f5a5e90bc6e711da /config | |
| parent | a4cadfb98def3ac6aaee3bb5a166fb0fd7072211 (diff) | |
| parent | c7c6495993e29d1d51defcad6925274e9efa0bc8 (diff) | |
pull y
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'config')
| -rw-r--r-- | config/passport.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/config/passport.js b/config/passport.js index 27f835f..6cb6292 100644 --- a/config/passport.js +++ b/config/passport.js @@ -7,22 +7,27 @@ var exports = module.exports = {}; var encryptPassword = exports.encryptPassword = function (password) { return bcrypt.hashSync(password, bcrypt.genSaltSync(5), null); -} +}; var comparePassword = function (password1, password2) { return bcrypt.compareSync(password1, password2); -} +}; + passport.serializeUser(function (user, done) { + done(null, user); }); passport.deserializeUser(function(user, done) { + done(null, user); }); + + // fields - [email, user_name, f_name, l_name, uni, department, password, phone_num] passport.use('local_signup', new LocalStrategy({ |
