0

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 2

1

Need to look at session idle time if you want it so that it expires after a certain time period.

http://symfony.com/doc/current/components/http_foundation/session_configuration.html#session-idle-time-keep-alive

You need to modify your config.yml file

#app/config/config.yml session: // set your values here cookie_lifetime: 86400 gc_maxlifetime: 18000 
Sign up to request clarification or add additional context in comments.

1 Comment

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.
0

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.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.