3
我一直在使用帶有Facebook登錄流程的loopback-component-passport。因爲我移動到一個單頁的應用程序,我正在使用FB SDK Facebook登錄如下所述:https://developers.facebook.com/docs/facebook-login/webLoopback-passport-component允許單頁面應用程序通過Facebook登錄
{
"facebook": {
"provider": "facebook",
"module": "passport-facebook",
"clientID": "<id>",
"clientSecret": "<secret>",
"callbackURL": "/auth/facebook/callback",
"authPath": "/auth/facebook",
"callbackPath": "/auth/facebook/callback",
"successRedirect": "/auth/account",
"failureRedirect": "/login",
"scope": [
"email"
],
"failureFlash": true
}
}
我能夠檢索與FB SDK中的FB訪問令牌,和發送response.authResponse.accessToken
值到GET http://localhost:3000/auth/facebook/callback?access_token=<token from FB sdk response>
但我得到一個html響應。
我做錯了什麼或迴環不支持此功能?