0

I am new to Laravel and for practicing I am trying to create a website like GoFundMe but simpler with Laravel and Vue js. But am very confused with Laravel's authentication systems, even though I have read most of the questions here.

Which authentication system should I use ? is it ok to use Sanctum for authentication and then Spatie for user permissions?

parastoo
  • 2,211
  • 2
  • 21
  • 38
aliana
  • 47
  • 5
  • The Laravel documentation has a section for [Passport Or Sanctum](https://laravel.com/docs/9.x/passport#passport-or-sanctum) which provides a succinct explanation of which package is appropriate in certain circumstances. The Spatie permissions package is totally separate from, and usable with, both Sanctum and Passport. – Peppermintology Oct 07 '22 at 14:49

1 Answers1

1

You have to have a clear concept of the topic authentication & authorization first. You may use Laravel Sanctum powered by Laravel framework as well. Because it provides authentication support for SPAs (single-page applications), mobile applications, and simple, token-based APIs. You may also have a look at passport later.

After passing your authentication, the topic authorization comes. You may use Gate. But as you are new to Laravel framework, then it seems to be a good choice to use laravel spatie for managing your permissions. But keep in mind that, it uses Gate concept under the hood.

parastoo
  • 2,211
  • 2
  • 21
  • 38
S Ahmed Naim
  • 315
  • 1
  • 8