samihsoylu / journal

Journal is a privacy first, self hosted digital log book. It is designed to be accessible anywhere you go, allowing you to organize your thoughts, feelings and opinions in one place.
GNU General Public License v3.0
66 stars 5 forks source link

Prevent auto sign out #31

Closed rohitshetty closed 1 year ago

rohitshetty commented 1 year ago

Hello! Thanks a lot for creating this project. I have been running this locally and have found that a lot of time, I am signed out automatically. I write lengthy posts and when I press save, it would have logged out, losing the post. Is there any configuration to set to prevent this from happening or increase the sign-out period?

Thanks for all your help!

samihsoylu commented 1 year ago

Hi @rohitshetty

I'm glad to hear that you are discovering the benefits of using Journal :)

By default, Journal is configured to keep a user session in the system for 24 hours. You can see this in public/.htaccess and here

Since you are hosting locally, it is likely that you need to configure your php.ini file in order to increase the session expiry limit. This is because the .htaccess file usually does not override system settings. After you configure your php.ini file, you must restart PHP.

You would need to search for the following configurations in your php.ini

If you are running your local environment on a laptop, or your desktop goes to stand-by. It is possible that the session gets lost this way too. Restarting PHP-FPM will cause your session to expire, and therefore log you out.

I hope this helps, don't hesitate to reach out again if you have more questions.

rohitshetty commented 1 year ago

Thank you! I have been running docker using your docker-compose.yml file - but will take a look at this and see if there is any way to modify this behavior. Thanks again for the pointers!

samihsoylu commented 1 year ago

@rohitshetty I am happy that this helped you out. For further questions, you can also get in touch with me over Discord. Follow this invite link: https://discord.gg/bfkMjU5teE to join my server