I want to create api for my project. But I will consume this api in this repository as a spa and in mobile app. How can I protect my web routes via jwt?
CodePudding user response:
you don't have to use JWT token. Laravel has a api protect package. check this https://laravel.com/docs/8.x/sanctum
if you want still use jwt token, you can use with laravel sanctum but laravel never recommends this. jwt is no longer a secure token algorithm.