How to automatically logout after the user closed all the tabs #3288
-
QuestionI am trying to figure out how to validate the login status of users, like when the user closed all the tabs, or after certain time of the user logged in, the app would log out automatically. I have tried to write |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi @logandoo, The storage data is kept in RAM and only written to disk for a potential app restart. Therefore changes to the JSON files are ignored while the app is running. If you want to make changes to the storage, you can write to |
Beta Was this translation helpful? Give feedback.
-
Shouldn't it be done by setting browser cookie lifetime? When it's expired, the user will be logged off. |
Beta Was this translation helpful? Give feedback.
Hi @logandoo,
The storage data is kept in RAM and only written to disk for a potential app restart. Therefore changes to the JSON files are ignored while the app is running.
If you want to make changes to the storage, you can write to
app.storage.user
directly.