Socket
Socket
Sign inDemoInstall

passport-local-sequelize

Package Overview
Dependencies
23
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.6.0 to 0.7.0

LICENSE

25

lib/passport-local-sequelize.js

@@ -14,2 +14,3 @@ var util = require('util'),

keylen: 512,
digest: 'sha1',
usernameField: 'username',

@@ -30,3 +31,4 @@ usernameLowerCase: false,

userExistsError: 'User already exists with %s',
activationError: 'Email activation required'
activationError: 'Email activation required',
noSaltValueStoredError: 'Authentication not possible. No salt value stored in db!'
};

@@ -47,3 +49,3 @@

hash: {
type: Sequelize.STRING,
type: Sequelize.TEXT,
allowNull: false

@@ -62,2 +64,6 @@ },

allowNull: true
},
verified: {
type: Sequelize.BOOLEAN,
allowNull: true
}

@@ -94,3 +100,3 @@ };

crypto.pbkdf2(password, salt, options.iterations, options.keylen, function (err, hashRaw) {
crypto.pbkdf2(password, salt, options.iterations, options.keylen, options.digest, function (err, hashRaw) {
if (err) {

@@ -130,4 +136,9 @@ return cb(err);

var self = this;
// TODO: Fix callback and behavior to match passport
crypto.pbkdf2(password, this.get(options.saltField), options.iterations, options.keylen, function (err, hashRaw) {
// prevent to throw error from crypto.pbkdf2
if (!this.get(options.saltField)) {
return cb(null, false, { message: options.noSaltValueStoredError });
}
crypto.pbkdf2(password, this.get(options.saltField), options.iterations, options.keylen, options.digest, function (err, hashRaw) {
if (err) {

@@ -226,6 +237,6 @@ return cb(err);

UserSchema.activate = function (email, password, activationKey, cb) {
UserSchema.activate = function (username, password, activationKey, cb) {
var self = this;
var auth = self.authenticate();
auth(email, password, function (err, user, info) {
auth(username, password, function (err, user, info) {

@@ -232,0 +243,0 @@ if (err) { return cb(err); }

{
"name": "passport-local-sequelize",
"version": "0.6.0",
"version": "0.7.0",
"description": "Sequelize plugin that simplifies building username and password login with Passport",

@@ -26,11 +26,11 @@ "main": "lib/passport-local-sequelize.js",

"passport-local": "~1.0.0",
"sequelize": "~3.1.1",
"lodash": "~3.8.0"
"sequelize": "~3.30.1",
"lodash": "~4.17.4"
},
"devDependencies": {
"mocha": "~1.18.2",
"jshint": "~2.5.0",
"sqlite3": "~2.2.3",
"should": "~3.3.1"
"mocha": "~3.2.0",
"jshint": "~2.9.4",
"sqlite3": "~3.1.8",
"should": "~11.2.0"
}
}

@@ -0,0 +0,0 @@ # Passport-Local Sequelize

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc