Ad

Laravel Passport Vs Laravel Sactum

- 1 answer

Description

Currently, all my clients project was builded using Laravel Passport but recently I had read about the Laravel Sactum. It sounds similar to me.

Questions

I am getting really confuse? What are the main different between these two and in what scenario we should use each of them? Since we already have passport, what is the point of having Laravel Sactum? Any hints?

Ad

Answer

laravel passport follows oauth2 and is one of the implementations.

laravel sanctum provides a simple way for your authentication system for SPAs.

As you already used passport, there is no point to change to sanctum.

Sanctum is for the app that does not want to use the complex oauth2 flow.

Ad
source: stackoverflow.com
Ad