Configure the cookie lifetime
- On the Admin sidebar, go to Stores > Settings > Configuration.
- If you have multiple stores, set the Store View chooser in the upper-right corner to the store where the configuration applies.
- In the left panel under General, choose Web.
- Expand Expansion selector the Default Cookie Settings section.
- To change the default, clear the Use system value checkbox and enter the new value in seconds.
- Click Save Config.
Configure Remember Me functionality
To make login easier, the Remember Me function allows user account holders to avoid entering their credentials every time they enter the storefront. For security reasons, the persistence feature is disabled by default.
- On the Admin sidebar, go to Stores > Settings > Configuration.
- In the left panel, expand Customers and choose Persistent Shopping Cart.
- Expand Expansion selector the General Options section.
- For Enable Persistence, set to Yes. (Clear the Use system value checkbox to allow changing the default setting.)
- For Enable “Remember Me”, set to Yes or No according to your requirements.
- Click Save Config.