How do I loggout user automaticly after X time? for now even the user come back after 2 days to his computer the app still bypass the login page and give him the authorization
2 Answers
Need to look at session idle time if you want it so that it expires after a certain time period.
You need to modify your config.yml file
#app/config/config.yml session: // set your values here cookie_lifetime: 86400 gc_maxlifetime: 18000 1 Comment
A.L
Hi @user3130641 if this or any answer has solved your question please consider accepting it by clicking the check-mark. This indicates to the wider community that you've found a solution and gives some reputation to both the answerer and yourself. There is no obligation to do this.
You want to look at the cookie expiry. Have a look at http://symfony.com/doc/current/components/http_foundation/session_configuration.html and search for cookie_lifetime. It sounds like you might want to set it to 0 so that it expires once the user closes their browser tab.