{"repo":"juliomotol/laravel-auth-timeout","free":true,"listed":false,"github":"https://github.com/juliomotol/laravel-auth-timeout","clone":"git clone https://github.com/juliomotol/laravel-auth-timeout.git","description":"Authentication Timeout for Laravel","language":"PHP","stars":43,"topics":["laravel","middleware","authentication","timeout"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Laravel Auth Timeout Handle Authentication timeouts in Laravel. When upgrading to v4, please see the CHANGELOG.md. For Laravel 8+ support, see v3. For Laravel 6+ support, see v2. Why Laravel Auth Timeout? There are times where we want to log out a user when they haven't done any request within a set time. There is a workaround (below): But this affects the entirety of the session. But it doesnt have to be and that is where Laravel Auth Timeout comes in. Laravel Auth Timeout is a small middleware package that checks if the user had made any request in a set of time. If they have reached the idle time limit, they are then logged out on their next request. Thanks to Brian Matovu's article. Installation You can install the package via composer: You can publish the config file with: This is the contents of the published config file: Usage Quick Start For a simple usage, register the CheckAuthTimeout in your Kernel.php . Then use that middleware on a route. Using Different Guards You might have multiple guards and only want to apply CheckAuthTimeout to certain ones. We got you covered, CheckAuthTimeout accepts a $guard parameter. NOTE: This package only works with guards that uses a session driver. AuthTimedOut An AuthTimedOut will be dispatch every time a user has timed out. You can assign a listener for this event in your EventServiceProvider . AuthTimedOut has two properties that you can access in your EventListener . Redirection To modify the redirection when a user has timed o","default_branch":null,"files":null,"tree":[],"storefront":"/r/juliomotol","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/juliomotol/laravel-auth-timeout/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}