Users frequently logged out


#1

When using Meteor + Cordova users seem to be logged out whenever the user’s IP address changes.

Is this expected behaviour?


#2

Nope, this is not expected. In my own Meteor app, users can be logged in “forever”.


#3

After doing some research it sounds like Android and iOS periodically clean localstorage especially when device storage is low.

There is a package that copies the login token to a file and restores it if the localstorage has been wiped.

https://atmospherejs.com/mbanting/cordova-accounts-resume

Not to future googlers:

To set the login token to never expire use:

Accounts.config({
    loginExpirationInDays: null
})

#4

Thanks for that hint. I never had that problem, but I have experienced another problem with local storage data being cleared. Maybe I can extend this package to save this data as well.