Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor 1.3+ Accounts Facebook Login for iOS not working

I have been trying to find a solution (sadly for 3 months now) to login with Facebook using Meteors Accounts Facebook on iOS. I have tried just about everything a Google search will come up with, reached out on the Meteor forums and even opened up a Github issue.

But this problem still escapes me. Everything works fine on desktop but as soon I as I test on mobile I get a Facebook error "Not Logged in. You are not logged in. Please login and try again" .

I have found several others with this issue and very little input on a full proof answer. And at this point I am starting to get desperate.

This wasn't a problem until Meteor went to 1.3 up.

enter image description here

like image 938
NicholasByDesign Avatar asked Oct 08 '16 19:10

NicholasByDesign


1 Answers

It's working for me with the following setup

  1. Latest version of Meteor and Xcode
  2. Account related Meteor Packages

    accounts-base
    accounts-password
    accounts-facebook
    accounts-google
    useraccounts:materialize 
    service-configuration
    accounts-ui
    splendido:accounts-meld
    
  3. Rendering the template with

    {{> atForm}}
    
  4. I also have 2 cordova plugins added (for that create a file inside .meteor folder with the name cordova-plugins and the following content

    cordova-plugin-meteor-webapp@https://github.com/meteor/cordova-plugin-meteor-webapp.git#8bf95eed3f313299fc2de33658866278eea2cdc5
    cordova-plugin-inappbrowser@https://github.com/apache/cordova-plugin-inappbrowser.git#2df0e72c36f1fda35c04b3b06bd7beaafaae6ee9
    
  5. Also make sure you have the following line in your html's head tag

    <meta http-equiv="Content-Security-Policy" content="default-src * 'unsafe-inline' 'unsafe-eval' data: " />
    
  6. Finally add the following lines in your mobile-config.js file

    App.accessRule('http://*', {type: 'navigation'});
    App.accessRule('https://*', {type: 'navigation'});
    

Also run a meteor reset command before building

like image 113
Afzal Hossain Avatar answered Nov 02 '22 03:11

Afzal Hossain