Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

darklord

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

darklord - npm Package Compare versions

Comparing version 1.0.5 to 1.0.6

3

package.json
{
"name": "darklord",
"version": "1.0.5",
"version": "1.0.6",
"author": "Gregory Pratt <gregory.pratt@me.com> (http://grumpywizards.com)",

@@ -19,2 +19,3 @@ "description": "Stateless JWT based authentication",

"scripts": {
"start": "node ./app.js",
"lint": "jshint . --exclude-path=.gitignore"

@@ -21,0 +22,0 @@ },

@@ -15,15 +15,14 @@ var passport = require('passport');

var secret = opts.secret || process.env.JWT_SECRET;
if (!opts.user) {
// If no user provided create passport strategy
passport.use(User.createStrategy());
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());
}
function register(req, res) {
var user = new User({
// let's assume passport is used always
passport.use(User.createStrategy());
passport.serializeUser(User.serializeUser());
passport.deserializeUser(User.deserializeUser());
function register(req, res, next) {
User.register({
email: req.body.email,
verifyToken: uuid.v4()
});
User.register(user, req.body.password, function (err) {
verifyToken: uuid.v4(),
}, req.body.password, function (err) {
console.log('ok', err);
if (err) {

@@ -34,3 +33,3 @@ res.status(400).send({ error: err });

// TODO: send verification email
authenticate(req, res);
authenticate(req, res, next);
}

@@ -40,3 +39,3 @@ });

function authenticate(req, res) {
function authenticate(req, res, next) {
passport.authenticate('local', { session: false }, function (err, user) {

@@ -50,3 +49,3 @@ if (err) {

}
})(req, res);
})(req, res, next);
}

@@ -53,0 +52,0 @@

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc