Solved User Login Timeout
-
By default, the session expiration time is around 10 min means if you are inactive on site from the last 10 min it will automatically log out after 10 minutes of inactivity.
If you wish to change it follow the below solution:
Locate the path in your project config -> packages -> framework.yaml
You will basically store the sessions in the /var/sessions/ directory and that's it, the lifetime option will work again. You can do this quickly by modifying your framework.yaml file in the session block like this:
session: handler_id: session.handler.native_file save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%' #2 Days lifetime (172800 seconds) cookie_lifetime: 172800 cookie_secure: 'auto' cookie_samesite: 'lax'
After saving the framework.yaml file you should clear your project cache by the below command:
$ php bin/console c:c
Once you make a try with the given solution, most probably it should works for you.
-
peopleinside
-
@Komal-Sharma Wonderful, thank you very much Komal. After a couple of failures initialising it (in yaml, tabs matter!), it seems to be working as intended.
I've set my lifetime at 2419200, as 28 days will hopefully be enough.
-
@storrington the bad news editing the core code is you can loose the edit when you update UVdesk.
-
@storrington said in User Login Timeout:
@Komal-Sharma Wonderful, thank you very much Komal. After a couple of failures initialising it (in yaml, tabs matter!), it seems to be working as intended.
I've set my lifetime at 2419200, as 28 days will hopefully be enough.
We are glad to know that your issue has been resolved now.
If would request you take a spare minute of yours and leave your valuable feedback with us if you liked our product & support.and leave your positive reviews here:
https://reviews.capterra.com/new/158346
https://www.trustpilot.com/review/uvdesk.comIt helps a lot to catch more customers like you and keeps us motivated and helps us to do better for this UVdesk opensource project.
Looking forward to seeking 5-star reviews from your side.
Awaiting your response.
-
@peopleinside thank you for the warning, I figured that might be the case. I'll write myself a note on how to put the change back in.
@Komal-Sharma we're not in production yet, but when it's up and working as intended I'll be sure to write a positive review
-
I have updated the framework.yaml file as instructed (cleared the cache, etc), but my session is still termintated on default timeout.
session: handler_id: session.handler.native_file storage_factory_id: session.storage.factory.native save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%' #2 Days lifetime (172800 seconds) cookie_lifetime: 172800 cookie_secure: 'auto' cookie_samesite: 'lax'
I can see that the session files are present on the var/sessions/prod folder:
$ ls -ltr total 16 -rw------- 1 xxxx xxxx 5731 Mar 20 11:04 sess_5ba960f1dd644841ce1bd23039064a7f -rw------- 1 xxxx xxxx 0 Mar 20 11:26 sess_0eed0aa1ac5b34ded6eeca85a7469761 -rw------- 1 xxxx xxxx 5729 Mar 20 11:27 sess_5839f77cacb7880a945f2e4bd2f6a466
Bare in mind I'm running the uvdesk/community-skeleton:dev-master
Kind regards,
A. -
peopleinside
-
@afe038 said in User Login Timeout:
I have updated the framework.yaml file as instructed (cleared the cache, etc), but my session is still termintated on default timeout.
Can you please share your framework.yaml file. Let us know have installed new project.
Also, share a log file. Please follow the below path for log file:your-project-folder-name/var/log/dev.log
-
Please find below my framework.yaml file:
$ cat config/packages/framework.yaml # see https://symfony.com/doc/current/reference/configuration/framework.html framework: secret: '%env(APP_SECRET)%' #csrf_protection: true http_method_override: false # Enables session support. Note that the session will ONLY be started if you read or write from it. # Remove or comment this section to explicitly disable session support. session: handler_id: session.handler.native_file storage_factory_id: session.storage.factory.native save_path: '%kernel.project_dir%/var/sessions/%kernel.environment%' #2 Days lifetime (172800 seconds) cookie_lifetime: 172800 cookie_secure: 'auto' cookie_samesite: 'lax' #esi: true #fragments: true php_errors: log: true when@test: framework: test: true session: storage_factory_id: session.storage.factory.mock_file
Please find the log here: https://notepad.link/y3jrz
-
Please find below my framework.yaml file:
We have checked the same steps with dev-master project and here working session login increase.
Also, Let us know you have any changes in your project.
We will check and update you, if we are able to reproduce this issue.Thanks for your time and patience!!!
-
@Komal-Sharma said in User Login Timeout:
for
Hi @Komal-Sharma,
I just checked, apart from the configuration of the email services and modification of the templates, no other change was performd (beside the modification of the framework.yaml file).
Kind regards,
Agron -
I just checked, apart from the configuration of the email services and modification of the templates, no other change was performd (beside the modification of the framework.yaml file).
Alright, thanks for update here. We will check and updated you, If we are able to reproduce this issue. It can takes some time.
Thanks for your time and patience!!!
-
@Komal-Sharma any update on this topic?
Can i mark as solved or still need update the user? -
We have checked and followed the above same steps but we are not able to reproduce this issue. Here, increase the session time also.
-
peopleinside
-
I'm still experiencing the issue after even after following the steps!
BR,
Agron -
@afe038 I'm sorry to read your issue still be not resolved.
Free support can be limited.You can try maybe to create a demo with the issue and show to the developer team but I think you can discuss this privately opening a private ticket https://support.uvdesk.com/en/customer/create-ticket/
-
@peopleinside, sure thing, I will try to setup the demo and a private ticket.
-
@afe038 yes, this is my suggestion.
Also provide in the ticket to developers steps to reproduce the issue.
A small video can also help the team.