We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1e4e1f commit 831940dCopy full SHA for 831940d
lib/middleware/initialize.js
@@ -49,6 +49,15 @@ module.exports = function initialize(passport, options) {
49
options = options || {};
50
51
return function initialize(req, res, next) {
52
+ req.login =
53
+ req.logIn = req.logIn || IncomingMessageExt.logIn;
54
+ req.logout =
55
+ req.logOut = req.logOut || IncomingMessageExt.logOut;
56
+ req.isAuthenticated = req.isAuthenticated || IncomingMessageExt.isAuthenticated;
57
+ req.isUnauthenticated = req.isUnauthenticated || IncomingMessageExt.isUnauthenticated;
58
+
59
+ req._sessionManager = passport._sm;
60
61
if (options.userProperty) {
62
req._userProperty = options.userProperty;
63
}
0 commit comments