Accounts-facebook & accounts-twitter force logout not working

I am using the accounts-facebook & accounts-twitter

Current login and logout process
[ login -> logout -> try login -> auto login ]
Why should this happen?

But I want a process below
[ login -> logout -> try login -> show sign-in form -> login ]

As the code I want an answer. ( I can not read English well ^^; )
please help me.

Please provide more detail – how is your app structured? how do you do ‘login’ and ‘try login’?

I’m using account-ui package.

try login => type the sns account & password

what is the actual code to make a login and logout?

Just use this code only.

{{> loginButtons}}
(by accounts-ui package…)

Then the short answer is that your logged-in-FB/Twitter state is saved inside your browser. So the next time you try to log in, they find that you are already signed in and given permissions to use an app.

To logout from facebook, you need to include their JS API and change logout sequence to include this call:


I suppose, something similiar is needed for twitter.

By the way, why you want user to log in every time? It’s very annoying, especially on mobile )

with out client code.
I want to facebook logout by only server-side.
It’s impossible ?

In mongo users collection there is object services with “resume” object inside with all the tokens and I would expect every 1 of these tokens represent the value browser is remembering.
So by deleting them …

I tried it that way.
But not cleard that issue.

ex) (in server-side)

var user = Meteor.users.findOne( {_id: userId} );
console.log('user : ', user);

Meteor.users.update( {_id: userId} , {$set : {"services.resume.loginTokens": [] } } );
//Meteor.users.update( {_id: userId} , {$set : {"services.resume.loginTokens": null } } ); 

It has not been solved in the above code.

Have you found any solution to this problem ? Even I want to log out the same way.
[ login -> logout -> try login -> show sign-in form -> login ]

It seems that Facebook keeps a cookie to keep the user signed in. Is there any way I can sign out from the meteor app and sign out from facebook ?

no, I’m not founded…

Has anyone found any solution to this problem. I am facing the exact issue. Tried following query on server while logging out but its not working:
Meteor.users.update( {_id: userId} , {$set : {"services.resume.loginTokens": [] } } );
May be we need to clear the webview’s cache too. Any thoughts?