masonite icon indicating copy to clipboard operation
masonite copied to clipboard

remember me password

Open ssestantech opened this issue 2 years ago • 1 comments

Is your feature request related to a problem?

remember me password

What do we currently have to do now?

remember me password

Describe the solution you'd like

remember me password checkbox functionality. how will i implement on login page. any doc for this.

Describe alternatives you've considered

No response

Would this be a breaking change ?

  • [ ] Yes

Anything else ?

No response

ssestantech avatar Dec 08 '22 07:12 ssestantech

@ssestantech

The simplest way is probably to use a cookie or session to store the user data (depending on the size of the data) during the Login (authentication) flow. When seting the data define an expiry time for that data lifetime.

If the remember me is checked then a longer time is set until the session/cookie data expires if not set a default which is defined in the config.session file as part of the driver options

The LoadUserMiddleware is a good place to start digging in to understand the logic as it is loaded (by default) after the SessionMiddleware. This will show you how the these middlewares work together.

You can the customise your own LoadUserMiddleware if additional logic is necessary.

Hope this helps

circulon avatar Jan 08 '23 03:01 circulon