Meteor.logout() when server has gone offline

This is a bit of an unusual one but we have a tablet that is used as a kiosk (available to our users with accounts) to access our meteor app.
We’re testing all eventualities at the moment and found that if the server goes offline while the user is logged in and Meteor.logout() is called, the logout doesn’t occur until the server is available again (which kind of makes sense). Is there a way to perform a logout of the user on the client? Perhaps simulating the logout by unsubscribing from users or by deleting some of the user information on the client side?

Meteor.connection.setUserId(null)

on client side should work for you.

Just tried and it looks like it works! Thanks @matik!

hallo matik i have code use try my code …
Template.sidebar.events({
‘click .signout’: function () {
Meteor.logout(function() {
});
}
});

+1

I have tried Meteor.connection.setUserId(null).
But still didn’t work for me.

I have also tried with Meteor.logout(). it works fine when internet is on.

but when user gone offline I didn’t get callback of Meteor.logout() function.

Is there any way. Please help.

Thanks.

SVDeveloper

Same issue with me + 1

Idk if it’s to late, but I had the same issue. If you do Meteor.logout() even if you are offline, when you go back online, meteor will resume the call, and do the logout.

Hope this helps!