Laravel Sanctum vs Passport & when to use Laravel Sanctum - Laravel SPA Authentication
HTML-код
- Опубликовано: 29 июн 2024
- With Laravel Sanctum being the "newer" package for Laravel, it can get confusing when you should use Sanctum for authentication over something like JWT or Laravel Passport when authenticating SPA, mobile app, or an API. In this video, I hope to help you decide which authentication package to choose as well as help you decide between Laravel Sanctum's token & session based authentications.
🤝 You can support me by giving my videos a 👍 & by subscribing to the channel ✔️
-- Table of Contents --
00:00 - Intro
00:30 - Built-in cookie-based session auth
00:43 - Laravel passport & oAuth
01:12 - Laravel sanctum - overview
01:51 - Laravel sanctum - authenticating the mobile app
02:16 - Laravel sanctum - authenticating another service
02:36 - Laravel sanctum - authenticating spa
Its much more clear now, thanks
You're welcome 👍
Great explanation, thanks!
Thank you 👍
Thanks for the quality tutorials❤
You're welcome
thank you Gio
You're welcome
Thank you.
You're welcome
Thanks for the explanation. It was great. But I want to know little bit more. what if my spa needs oauth2 which should I use? should I use passport and sanctam both!!
If you need oAuth then just use passport.
great explanation 👍 btw what is the next video title? can you share the link please
Thank you. Next video for? This is a stand alone video it's not part of a playlist. You can check channel playlists or channel videos for more content.
what would you recommend for SSO?
Haven't done much SSO so I'm not sure to be honest
I am not still clear about the passport, You only talked about sanctum and at last you said yes for passport. please make more clear. Clearly explain both Sanctum and passport and then recommendation with point
Not sure I understand. In the beginning I talk about passport and explain what it is so I'm not sure what exactly is not clear. This lesson isn't about passport or sanctum it's a 3 min video quickly explaining the difference.
00:44 this is where I explain what passport is so I don't only talk about passport at the end of the video. Perhaps you skipped/missed this part?
Oh yes! Thanks for getting back.
In your point of view - How passport is better than sanctum?
@@softwareEngineerKunwar I don't think passport is better than Sanctum. They solve different problems. Passport is great when you need oAuth features and API token based auth. Sanctum is great when you want to authenticate first party SPA, mobile app or APIs. Either can be used for API but I prefer Sanctum and only go for Passport if I need oAuth
Thanks a lot. I am clear now.
Great explanation, thanks!
Thank you