Socket
Socket
Sign inDemoInstall

passport

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

passport - npm Package Compare versions

Comparing version 0.1.9 to 0.1.10

36

lib/passport/middleware/authenticate.js

@@ -73,12 +73,14 @@ /**

}
if (options.successFlash && info) {
var option = options.successFlash;
if (typeof option == 'string') {
option = { type: 'success', message: option };
info = info || {}
if (options.successFlash) {
var flash = options.successFlash;
if (typeof flash == 'string') {
flash = { type: 'success', message: flash };
}
option.type = option.type || 'success';
flash.type = flash.type || 'success';
var type = option.type || info.type || 'success';
var msg = option.message || info.message || info;
var type = flash.type || info.type || 'success';
var msg = flash.message || info.message || info;
if (typeof msg == 'string') {

@@ -105,12 +107,14 @@ req.flash(type, msg);

}
if (options.failureFlash && challenge) {
var option = options.failureFlash;
if (typeof option == 'string') {
option = { type: 'error', message: option };
challenge = challenge || {}
if (options.failureFlash) {
var flash = options.failureFlash;
if (typeof flash == 'string') {
flash = { type: 'error', message: flash };
}
option.type = option.type || 'error';
flash.type = flash.type || 'error';
var type = option.type || challenge.type || 'error';
var msg = option.message || challenge.message || challenge;
var type = flash.type || challenge.type || 'error';
var msg = flash.message || challenge.message || challenge;
if (typeof msg == 'string') {

@@ -117,0 +121,0 @@ req.flash(type, msg);

{
"name": "passport",
"version": "0.1.9",
"version": "0.1.10",
"description": "Simple, unobtrusive authentication for Node.js.",

@@ -5,0 +5,0 @@ "author": { "name": "Jared Hanson", "email": "jaredhanson@gmail.com", "url": "http://www.jaredhanson.net/" },

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