fix bug calling both success and accept
This commit is contained in:
11
lib/index.js
11
lib/index.js
@ -46,15 +46,12 @@ function authorize(options) {
|
||||
return accept(null, false);
|
||||
}
|
||||
|
||||
if( auth.success ) {
|
||||
auth.passport.deserializeUser(userKey, function(err, user) {
|
||||
data[ auth.userProperty ] = user;
|
||||
return auth.success( data, accept );
|
||||
});
|
||||
}
|
||||
auth.passport.deserializeUser(userKey, function(err, user) {
|
||||
data[ auth.userProperty ] = user;
|
||||
return accept(null, true);
|
||||
if( auth.success ) {
|
||||
return auth.success( data, accept );
|
||||
}
|
||||
accept(null, true);
|
||||
});
|
||||
|
||||
});
|
||||
|
Reference in New Issue
Block a user