Accounts.config behaviour change - 1.5.2 [Solved]

Hi,

Since the upgrade, my meteor application behaviour on login/logout has changed. Currently, in my imports->startup->sever->accounts.js I have the following -

import { Accounts } from 'meteor/accounts-base';

Accounts.config({
  // loginExpirationInDays: 0.0416667,
  loginExpirationInDays: null,
});

Prior to 1.5.2, this meant during dev, restarts due to code changes would allow me to not have to login/logout, i.e. user would be logged in continuously. Since the update, i now need to login every single time i make a code change, as meteor logs out my user (i.e. the fixture user, admin@admin.com).

Does anyone know how I would start to understand what is happening? Assistance much appreciated.

Edit: Not sure if this is obvious, but during the dev process, the idea is setting the loginExpirationInDays: null to make it easy to test. This is what has stopped working.

Note: I have not yet tested to see what happens when i set the loginExpirationInDays to a non null value. Just trying to track the error at this point, error may be on my side, not sure.

1 Like

Not sure it’s the exact same problem, but I keep getting logged out of my app since updating to Meteor 1.5.2, including on my deployed app. No error message on client or server, just logged out for no reason.

I also have loginExpirationInDays set to null, but I’ve always had that. Not sure what the issue is, will stick to 1.5.1 for now.

are you able to deploy 1.5.2 to galaxy - mine is failing? I might also moved back to 1.5.1.

If you use Chrome and look at the inspector, click on the application tab and then storage->local storage. It will show your token expiration date. If you use 1.5.2, setting the loginexpiration to null makes the date invalid, showing a 1960s date. That is obviously expired, so each time you reload, it logs out you. I noticed this and changed the loginexpiration to 3650 (10 years), works just fine. The date needs fixed.

3 Likes

Thank you, that fixed my problem!

legend… much appreciated.