mirror of
https://github.com/Thream/socketio-jwt.git
synced 2024-07-21 09:38:31 +02:00
Merge pull request #24 from richardassar/userKey_zero_val
Allow 0 value for serialized user (id)
This commit is contained in:
commit
8ef08d5a07
@ -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);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user