mushood
153
3
Laravel

Expected remember_me functionality

Posted 2 months ago by mushood

When I login, i have the option of either ticking the remember box or not. I want to walk through both scenarios to see if I got them right:

  1. NOT CHECKING THE BOX

A/ I login and only a session cookie is set.

B/ I can navigate to different pages.

B.1/ If this session cookie expires due to inactivity for example, when I come back and refresh on an authentication-required page, I will land on the login page.

B.2/ If I close the browser, when I open the browser again, if I go to authentication-required page, I will land on the login page.

  1. CHECKING THE BOX

A/ I login and a session cookie is set as well as a remember_me cookie is set.

B/ I can navigate to different pages.

B.1/ If this session cookie expires due to inactivity for example, when I come back and refresh on an authentication-required page, I will NOT land on the login page. Instead since the remember_me cookie is set, it will auto login, and redirect me to my page.

B.2/ If I close the browser, when I open the browser again, if I go to authentication-required page, I will NOT land on the login page. Instead since the remember_me cookie is set, it will auto login, and redirect me to my page.

If that how this should works? Especially the part when you close the browser and reopen after.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.