My Facebook login randomly stopped working. I updated to the latest version of Meteor (1.4.4.1) but I’m getting the following internal server error (as viewed in Galaxy logs):
2017-04-15 22:45:47-04:00{"line":"431","file":"oauth.js","message":"Error in OAuth Server: Failed to complete OAuth handshake with Facebook. {\"access_token\":\"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx\",\"token_type\":\"bearer\",\"expires_in\":5153934}","time":{"$date":1492310747097},"level":"warn"}
2017-04-15 22:45:47-04:00Exception while invoking method 'login' Error: Failed to complete OAuth handshake with Facebook. {"access_token":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","token_type":"bearer","expires_in":5153934}
2017-04-15 22:45:47-04:00 at getTokenResponse (packages/facebook-oauth.js:97:11)
2017-04-15 22:45:47-04:00 at Object.handleOauthRequest (packages/facebook-oauth.js:52:18)
2017-04-15 22:45:47-04:00 at OAuth._requestHandlers.(anonymous function) (packages/oauth2.js:27:31)
2017-04-15 22:45:47-04:00 at middleware (packages/oauth.js:203:5)
2017-04-15 22:45:47-04:00 at packages/oauth.js:176:5
This issue is “random” in that I haven’t uploaded any new code in a few weeks. When I read this thread I thought “great, I just need to update Meteor to the latest version” but that hasn’t worked…
EDIT: I fixed the issue. I was using facebook-oauth@1.3.1-beta.1 and rolled back to facebook-oauth@1.3.0. I had to meteor remove accounts-facebook
and then meteor add accounts-facebook
to get it working. Removing facebook-oauth doesn’t work.