The Simple & Efficient Way to Enable JWT auth in Laravel By Using PHP-JWT Module
Too Long; Didn't Read
Laravel uses firebase/php-jWT to generate and authenticate users. Laravel's web-sockets authenticate process is all done behind the scenes behind the Scenes. This solution is not for those who using passport in their application as Laravel has an inbuilt system to support that. Use this only if you have a custom JWT implementation. We can provide custom middleware implementation for authentication routes for routes. We need to update the API guard driver to custom-jwt in Configuration/auth.php after this.