userbase
userbase copied to clipboard
localStorage session expires too early
To reproduce:
- Log in with rememberMe: 'local'. I said to remember me for 1 year to test with.
- Check localStorage; userbaseCurrentSession will have a correct expirationDate
- Refresh the page and wait for userbase to initialize
- Check localStorage; userbaseCurrentSession will now have an expirationDate that is too early
- This causes the session to expire too early!
Are you passing a sessionLength param to init as well?
Oh, I remember reading about how that was an argument in the docs but I completely forgot it! Thanks!
That said, I think it's pretty surprising that not specifying this in the init call will actually reduce the session length when the user logs in.
Agreed. Most sensible default behavior if session length is not specified in init would maintain the session length already set (neither reduce nor extend the session length).
Will keep this open until implemented