我找不到关于此功能的文档,因此我无法使其正常工作.该函数何时被调用,它正在做什么以及它作为第一个参数采取了什么?我正试图从护照获取访问令牌,但无论如何都无法访问它.
passport.use(new FacebookStrategy({ clientID: APP_ID, clientSecret: APP_SECRET, callbackURL: "http://localhost:3000/", }, function(accessToken, refreshToken, profile, done) { User.findOrCreate({// what are these parameters?}, function (err, user) { // when is this function called and what is it doing? }); } ));
如何从护照获取访问令牌?