How to fix Facebook login after migrating to Meteor 1.3?

This is what I’m talking about.

After migrating from Meteor 1.2 to 1.3 my Facebook login got broken. It works on browser, but not on Android or iOS devices. Both mobile platforms result similar error, so migration probably causes a need to change configuration in Facebook’s end.

Meteor 1.3 migration guide tells me the following:

The plugin used to serve your app’s files and support hot code push has been completely rewritten. As a result, files are now served from localhost instead of meteor.local, with a fixed port number derived from your appId. You may have to update OAuth redirect URLs to point to the new local domain and port.

I used to have localhost:3000 in valid OAuth redirect URIs. What exaclty should there be nowadays?

Do you want to take a look at this issue and see if it matches your problem (or if the the fix works)? It seems to be a rather nasty upstream bug with Cordova.

1 Like

I checked it. My problem’s origin is probably different, since my in-app browser behaves quite much as expected. I don’t get white screen in my in-app-browser. However, I tried replacing my in-app-browser, and it didn’t seem to affect my app in any way.

@abernix: In fact, your bug report and the workaround was useful to me. I bumped into that very same bug after finding out a workaround to that login problem.

I found out, that the login works if the cordova app is deployed against an external server. So if I build the app with --server and then run it, it works. But if I run it like “meteor run ios”, it doesn’t work. I really don’t know, what I should use as oAuth redirect URI to succesfully use Facebook login when running instead of building and running.

What works:

meteor build ~/Temp/foobar --server localhost:3000 && open ~/Temp/foobar/ios/project/Foobar.xcodeproj/ && meteor

meteor build ~/Temp/foobar --server http://external.foo.bar && open ~/Temp/foobar/ios/project/Foobar.xcodeproj/

What doesn’t work:

meteor run ios

Hello , I have the same issue so far , did you manage to find a solution for it ?

Try getting your local ip with ifconfig then adding that to the facebook allows uris

This is probably a stupid questions but can your clarify what Temp/foobar pointers you are pointing to?

I ran into the same issue as you and I’m going to try this solution. I’ve been at this for almost 2 weeks. So I’m hoping this is a temporary fix.

It’s just random/arbitrary folder I decided to use as build directory. It can be pretty much anything. So instead of ~/Temp/foobar you could have, for example, ~/Desktop/any/folder. And ~ is a shorthand for your home directory (e.g. /home/nicholasbydesign)

1 Like