Skip to content

Commit ce03b97

Browse files
authored
Merge pull request #18 from mjsalinger/2-Removed-next
2 removed next
2 parents 86a7896 + 9b4ab13 commit ce03b97

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

index.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ ExpressOAuthServer.prototype.authenticate = function(options) {
4545
})
4646
.tap(function(token) {
4747
res.locals.oauth = { token: token };
48+
next();
4849
})
4950
.catch(function(e) {
5051
return handleError(e, req, res);
51-
})
52-
.finally(next);
52+
});
5353
};
5454
};
5555

@@ -80,8 +80,7 @@ ExpressOAuthServer.prototype.authorize = function(options) {
8080
})
8181
.catch(function(e) {
8282
return handleError(e, req, res, response);
83-
})
84-
.finally(next);
83+
});
8584
};
8685
};
8786

@@ -112,8 +111,7 @@ ExpressOAuthServer.prototype.token = function(options) {
112111
})
113112
.catch(function(e) {
114113
return handleError(e, req, res, response);
115-
})
116-
.finally(next);
114+
});
117115
};
118116
};
119117

@@ -131,6 +129,7 @@ var handleResponse = function(req, res, response) {
131129
*/
132130

133131
var handleError = function(e, req, res, response) {
132+
134133
if (response) {
135134
res.set(response.headers);
136135
}

0 commit comments

Comments
 (0)