[hacked] No registered oauth service found for: facebook

I get this weird error after we updated to Meteor 1.2.
We use particle4dev:cordova-fb for handling logins.
It doesn’t happens on mobile. Only in browser. Everything was working flawlessly before 1.2.
I tracked the source of error to accounts-oauth.js. Looks like a ‘facebook’ service is not in registered services list at a time. But why only in browser? Not in mobile?

particle4dev:cordova-fb registers itself as a facebook in login.js:

Accounts.oauth.registerService('facebook');

Can it be some kind of file loading order issue? How to debug them then? )

So, just going to stored accounts-oauth/os/packages/accounts-oauth.js and just removing this check:

if (!_.contains(Accounts.oauth.serviceNames(), result.serviceName))

for ‘facebook’ service helps. But, i still don’t know what is the cause of the problem, why it happens only on desktop browser and why it works, then…

Hi
I just spent several hours to look for this problem and I just found the solution : add a

Accounts.oauth.registerService('your-service-name');

on both client and server. Before I was doing it only on client-side, but since the update to Meteor 1.2 I had the exact same error. This worked for me.
See https://github.com/meteor/meteor/commit/80100f53ab9d53de7d346b58a0205f14e67b08e2 for details.

Best,

1 Like

@breucker thank you thank you thank you! I just burnt half a day on this issue, and your solution worked. No idea why it works… but hey :smile: