Allow 0 value for serialized user (id)

This commit is contained in:
Richard Assar 2013-06-30 20:06:21 +01:00
parent c5d4489d68
commit efef45309f

View File

@ -55,9 +55,10 @@ function authorize(options) {
var userKey = session[ auth.passport._key ][ auth.userProperty ]; var userKey = session[ auth.passport._key ][ auth.userProperty ];
if( !userKey && auth.fail ) { if(userKey === undefined)
if(auth.fail)
return auth.fail( data, accept ); return auth.fail( data, accept );
} else if( !userKey ) { else
return accept(null, false); return accept(null, false);
} }