Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facebook login auto logins with previous details #118

Open
paduchurikowsik opened this issue Aug 3, 2017 · 0 comments
Open

Facebook login auto logins with previous details #118

paduchurikowsik opened this issue Aug 3, 2017 · 0 comments

Comments

@paduchurikowsik
Copy link

paduchurikowsik commented Aug 3, 2017

hey i was following the tutorials and i implemented the Facebook login, the issue is when i did 'login with fb' it open my in app fb app and i gave permissions to app. Then it logged me in no issues.

Next i logged out of facebook app, i logged out of my app and when i tried logging in back it logs me in with previous account details. i tried removing facebook app and reinstalled my app, still when i clicked 'login with fb' it logs me in with previous account account details automatically.

i am using
ionic = 3.6.0
@ionic/cli-plugin-cordova = 1.5.0
@ionic/cli-plugin-ionic-angular = 1.4.0

here is the code
Login function

 loginFacebook(): void {
      console.log("clicked");
      const options = {
               requestPermissions: ['public_profile', 'user_friends', 'email']
       };

        Meteor.loginWithFacebook(options, (error: Error) => {
                 if (error) {
                         console.log(error);
                 } else {
                         console.log("success");
                 }
         });
   }

logout function

   Meteor.logout(function (error) {
          if (error) {
            console.log(error);
          } else {
            console.log("successful");
          }
    });

****update:
by having a look at

btafel:accounts-facebook-cordova

code i understood that they are using "facebookConnectPlugin.login()" method to get the login credentials for "Accounts.callLoginMethod()" but the issue i see is no one is calling "facebookConnectPlugin.logout()" method anywhere in the package, so "facebookConnectPlugin" stays logged in all the time. When using "Meteor.logout()" we need to logout of "facebookConnectPlugin" also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant