Skip to content

Instantly share code, notes, and snippets.

View eduludi's full-sized avatar
💎

Eduardo Ludi eduludi

💎
View GitHub Profile
@adityamukho
adityamukho / User.js
Last active November 11, 2021 21:41
Passport authentication for Sails.js 0.9.x
/**
* api/models/User.js
*
* The user model contains the instance method for validating the password.
*/
var bcrypt = require('bcrypt');
function hashPassword(values, next) {
bcrypt.hash(values.password, 10, function(err, hash) {