我正在尝试将 aLinkedInStrategy
与现有的LocalStrategy
(用户已经过身份验证)结合起来。
这是来自护照文档的示例:
schema.statics.passportLinkedInStrategy = function(token, tokenSecret, profile, done) {
// asynchronous verification, for effect...
process.nextTick(function () {
// To keep the example simple, the user's LinkedIn profile is returned to
// represent the logged-in user. In a typical application, you would want
// to associate the LinkedIn account with a user record in your database,
// and return that user instead.
return done(null, profile);
});
};
问题是我无权req.user
检查此回调中的现有会话。
关于我可以/应该怎么做的任何想法?