Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Meteor Facebook Login Error Accounts.LoginCancelledError: No matching login attempt found

I get the following strange Error in my meteor application when users try to login with facebook. Its not that all logins are not working but as we launched today i get 4 or 5 every hour. Which also means im loosing many users.

Error:

Accounts.LoginCancelledError: No matching login attempt found

Method which throws the error(its called on client side):

Meteor.loginWithFacebook({requestPermissions: ['email']}, function(err){
            if (err) {
                console.log(err);
                throw new Meteor.Error("Facebook login failed");
            }
            else
            {
                Router.go('browseCampaigns');
            }
        });

Also i add the FB Profile Picture in the onCreateUser() Method:

  user.services[service].picture = "https://graph.facebook.com/" +  user.services[service].id + "/picture/?type=large";

Can this cause this problem?

like image 585
Mario Deubler Avatar asked Nov 09 '22 09:11

Mario Deubler


1 Answers

If you have facebook working when you test it this can be caused by:

  • the user closing the popup before authorising your app
  • your app being unable to talk to facebook (unlikely if you have logins working/if the site is hosted on commercial servers)

There's not much that can be done in the first case. You've mentioned in your code you ask the user for their email address. If a user is uncomfortable with this they are likely to close the login popup.

like image 125
Tarang Avatar answered Nov 14 '22 23:11

Tarang