diff --git a/lib/index.js b/lib/index.js index ed7dc1f..3813b1d 100644 --- a/lib/index.js +++ b/lib/index.js @@ -25,11 +25,11 @@ function authorize(options) { fail: function(data, message, critical, accept){accept(null, false)} }; - var auth = xtend({}, defaults, options ); + var auth = xtend(defaults, options); auth.userProperty = auth.passport._userProperty || 'user'; - if (typeof auth.cookieParser === 'undefined' || !auth.cookieParser) { + if (!auth.cookieParser) { throw new Error('cookieParser is required use connect.cookieParser or express.cookieParser'); }