Comparing version 0.1.9 to 0.1.10
@@ -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/" }, |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24620
757