Understanding Admin Session Timeout
Admin session timeout in Magento 2 refers to the designated period of inactivity after which an administrator’s session is terminated automatically. This security feature is essential for protecting sensitive data and applications from unauthorized access. The length of an admin session timeout can significantly impact both the security posture of the application and the overall user experience for administrators who manage the backend of the system.
We can increase or decrease with the below options.
1. From the Backend
Increase the admin login session lifetime by navigating to:
Stores >> Settings >> Configuration >> Advanced >> Admin >> Security >> Admin Session Lifetime (in seconds)
2. From Command Line(CLI)
php bin/magento config:set admin/security/session_lifetime 9999
3. Using Database Query
update `core_config_data` set `value` = '31536000' WHERE `path` = 'admin/security/session_lifetime';
I sincerely hope that this article has provided you with the valuable information you were looking for. Furthermore, it would be great if you could share this solution with your team, as it may benefit others who are seeking similar insights.
Thank you for your engagement!