Laravel Passport or Sanctum | What is OAuth, & How it Works?
HTML-код
- Опубликовано: 2 окт 2024
- After the Laravel Sanctum package was released? Everywhere question was asked that When to use Sanctum and when to use Passport? So, in this video, you will see what is the difference between Laravel Sanctum & Passport package, and which could fit your need.
𝐒𝐏𝐀 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐮𝐬𝐢𝐧𝐠 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐒𝐚𝐧𝐜𝐭𝐮𝐦
• #1: SPA Authentication...
𝐀𝐏𝐈 𝐓𝐨𝐤𝐞𝐧 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧 𝐮𝐬𝐢𝐧𝐠 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐒𝐚𝐧𝐜𝐭𝐮𝐦
• #2: API Token Authenti...
𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐏𝐚𝐬𝐬𝐩𝐨𝐫𝐭 𝐀𝐏𝐈 𝐀𝐮𝐭𝐡𝐞𝐧𝐭𝐢𝐜𝐚𝐭𝐢𝐨𝐧
• Laravel Passport API A...
#𝟏 - 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐏𝐚𝐬𝐬𝐩𝐨𝐫𝐭 𝐎𝐀𝐮𝐭𝐡𝟐 𝐒𝐞𝐫𝐯𝐞𝐫 𝐈𝐦𝐩𝐥𝐞𝐦𝐞𝐧𝐭𝐚𝐭𝐢𝐨𝐧
• #1 - Laravel Passport ...
#𝟐 - 𝐓𝐨𝐤𝐞𝐧 𝐒𝐜𝐨𝐩𝐞𝐬 𝐢𝐧 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐏𝐚𝐬𝐬𝐩𝐨𝐫𝐭 𝐎𝐀𝐮𝐭𝐡𝟐
• #2 - Token Scopes in L...
#𝟑 - 𝐑𝐞𝐟𝐫𝐞𝐬𝐡 𝐭𝐨𝐤𝐞𝐧𝐬 𝐢𝐧 𝐋𝐚𝐫𝐚𝐯𝐞𝐥 𝐏𝐚𝐬𝐬𝐩𝐨𝐫𝐭 𝐎𝐀𝐮𝐭𝐡𝟐
• #3 - Refresh tokens in...
Also, follow us on:
𝐅𝐚𝐜𝐞𝐛𝐨𝐨𝐤: qirolab
𝐓𝐰𝐢𝐭𝐭𝐞𝐫: / qirolab
*Don't get left behind! Try Spec Coder: Supercharge Your Coding with AI!*
👉 qirolab.com/spec-coder
Thank You very much for the simple explanation 🤝
Glad you like it!
May I use sanctum token api and spa auth together? One for admin api and spa for vue app?
Let's say I need to authenticate a user using another website. I don't need my own authentication system since whenever my application is accessed, I redirect them to the other website. In that case, do I need Sanctum or Passport?
Thanks a lot bro, I now know that I have to use Sanctum
thanks for helping me decide on the proper package for my project.
thank you sir, for building react/laravel app must use scantum or passport to make auth .. can't use standard laravel auth ?
easily you can use JWT Auth library
github.com/tymondesigns/jwt-auth
the mean idea of using JWT it to check user authorization before reaching the database, I don't know why they store the token in database either sanctum or api_token in users table
laravel.com/docs/5.8/api-authentication
Thanks
please create setup laravel environment for linux.
Hello, thanks for your video,itsawesome.
In my project , the laravel fortify alreadyrhere, at this time i want to combine it with this sanctum for the CRUDapi, is it possible to do that?
Yes, you can
Really thanks a Lot. I was On an Issue with Them long time. You Made Them Easy. 1 Sub +
Glad I could help
Thanks mate, appreciate your video.
My pleasure!
Thanks for tutorials. So, can I use laravel sanctum for my laravel8 project with vue3 with multi platform application?
Yes, absolutely
Thanks bro
Welcome
So does that mean sanctum is better than passport or it depends with how/where you use?
It depends on your requirements, Passport provides a full OAuth2 server implementation. If your project need to use OAuth implementation then use Passport. otherwise, the sanctum is a good choice.
@@QiroLab Thank you
You're very welcome!
@@QiroLab sanctum api can be used in mobile application ?
Snactum dont work with Nuxt Auth Module, so far now i recomend use Passport..Sanctum Will support con NuxtAuthModule V5..
github.com/nuxt-community/auth-module/issues/737#issuecomment-646885519
Laravel Livewire vs Vue Js Axios?
what is Livewire ?
@@MahmoudMohsab It's a Way to create Single Page Application with Laravel
If it's a simple SPA, I prefer Laravel Livewire else for all other Vue JS Axios. Alternatively try Nuxt that based on Vue.
if you know vue, why even consider livewire?
if your app is not complex and you dont want to learn js, use livewire.
@@namazbekbekarysuly9112 I know Vue If I am not using SPA I might use lIvewire for making Ajax calls