<img height="1" width="1" style="display:none;" alt="" src="https://ct.pinterest.com/v3/?event=init&amp;tid=2612994575055&amp;pd[em]=<hashed_email_address>&amp;noscript=1">
Skip to content
    AdminOct 2, 2023 5:03:42 PM< 1 min read

    Laravel logout from all devices

    Laravel logout from all devices

    Close the authenticated routes in AuthenticateSession middleware using auth.session key.

    Route::middleware(['auth', 'auth.session'])->group(function () {
        //routes 
    });
    public function logoutAllDevices(Request $request){
         $currentPassword = $request->input('currentpassword');
         Auth::logoutOtherDevices($currentPassword);
    }

    click for more Laravel codes read about laravel authentication

    COMMENTS

    RELATED ARTICLES