Level 53
- If you plan to use oAuth 2 for authentication, use Passport.
- If you plan to put the frontend and the backend on the same domain, use Sanctum
- If you plan to put the frontend and the backend on different domains, use JWT / Passport
2 likes
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Any people who have built laravel API's for enterprise-level applications?
Which one to use, Sanctum or Passport for authentication?
My primary usage is to link the backend(laravel api) with the vue frontend. Which authentication is okay for this?
Please or to participate in this conversation.