Home > Mobile >  How to protect web routes via jwt auth in laravel?
How to protect web routes via jwt auth in laravel?

Time:11-10

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.

  • Related