ReferenceError: Can't find variable: OAuth

Calling this line on the client:
var loginStyle = OAuth._loginStyle('facebook', config, options);

Throws ReferenceError: Can't find variable: OAuth

Can I not access OAuth on Client.

The exported object is Oauth (lowercase a).

Now I get.

ReferenceError: Can't find variable: Oauth

Have you done a meteor add accounts-facebook?

Yes I have added accounts-facebook.

OAuth (or Oauth - both can be used now) won’t be available directly unless you add the oauth package explicitly. So meteor add oauth should help.

1 Like