我按照 Mongoose-auth 的说明,让系统在我的 node.js 上运行:https ://github.com/bnoguchi/mongoose-auth
facebook: {
everyauth: {
myHostname: 'http://localhost:3000'
, appId: 'YOUR APP ID HERE'
, appSecret: 'YOUR APP SECRET HERE'
, redirectPath: '/home'
}
}
因此,我使用 Mongoose-auth 进行了此操作,并且能够通过 Facebook 进行连接。我想要的是在 Facebook 回击我之后“做点什么” 。现在,它只是将我重定向到“家”,并将用户登录。我想做一些事情,然后再将我重定向到家。我该怎么做?
在 EveryAuth 中,我使用了这个:
.findOrCreateUser( function (session, accessToken, fbUserMetadata) {
// find or create user logic goes here
})
但我猜这在 mongoose-auth 中不可用……因为那不在文档中。