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

Комментарии • 24

  • @lawrencenjenga8556
    @lawrencenjenga8556 3 года назад +1

    Its much more clear now, thanks

  • @FoohonPie
    @FoohonPie 3 года назад +1

    Great explanation, thanks!

  • @prasoojas2093
    @prasoojas2093 Год назад

    Thanks for the quality tutorials❤

  • @WhiteSiroi
    @WhiteSiroi Год назад

    thank you Gio

  • @memack101
    @memack101 2 года назад

    Thank you.

  • @kajolahammed6816
    @kajolahammed6816 2 года назад

    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!!

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      If you need oAuth then just use passport.

  • @Unicron376
    @Unicron376 2 года назад

    great explanation 👍 btw what is the next video title? can you share the link please

    • @ProgramWithGio
      @ProgramWithGio  2 года назад

      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.

  • @mel-182
    @mel-182 Год назад

    what would you recommend for SSO?

    • @ProgramWithGio
      @ProgramWithGio  Год назад

      Haven't done much SSO so I'm not sure to be honest

  • @softwareEngineerKunwar
    @softwareEngineerKunwar 3 года назад

    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

    • @ProgramWithGio
      @ProgramWithGio  3 года назад

      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.

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +2

      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?

    • @softwareEngineerKunwar
      @softwareEngineerKunwar 3 года назад

      Oh yes! Thanks for getting back.
      In your point of view - How passport is better than sanctum?

    • @ProgramWithGio
      @ProgramWithGio  3 года назад +4

      @@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

    • @softwareEngineerKunwar
      @softwareEngineerKunwar 3 года назад +1

      Thanks a lot. I am clear now.

  • @atanasatanasov859
    @atanasatanasov859 2 года назад

    Great explanation, thanks!