我尝试使用passwordjs登录到Facebook。
The problem is after Facebook redirect me to the callback URL, I invoke passport.authenticate
function. and I get back 302 with redirection to Facebook again.
I suspect that happens because I have two domains: example.com
and api.example.com
.
In api.example.com, I call to passport.authenticate('facebook', { ... })(req, res, next))
.
and the return function is in example.com
route.
这可能是一个问题,因此将其发送到返回URL后,我得到302重定向回到Facebook吗?