thanks to @chill117
we can't check undefined for undefined
This commit is contained in:
parent
928cd508ff
commit
2a3cfdb8ff
@ -46,10 +46,10 @@ function authorize(options) {
|
||||
auth.store.get(data.sessionID, function(err, session){
|
||||
if(err)
|
||||
return auth.fail(data, 'Error in session store.', true, accept);
|
||||
if(!session[auth.passport._key])
|
||||
return auth.fail(data, 'Passport was not initialized', true, accept);
|
||||
if(!session)
|
||||
return auth.fail(data, 'No session found', false, accept);
|
||||
if(!session[auth.passport._key])
|
||||
return auth.fail(data, 'Passport was not initialized', true, accept);
|
||||
|
||||
var userKey = session[auth.passport._key][auth.userProperty];
|
||||
|
||||
|
Reference in New Issue
Block a user