LinkedInStrategy
を既存のものと組み合わせようとして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
問題は、このコールバックで既存のセッションを確認するためのアクセス権がないことです。
どうすればできる/すべきかについて何か考えはありますか?