Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Quaque's avatar

Laravel sanctum with multiple API auth provider?

Hi.. Can we use laravel sanctum with multiple API auth provider? If yes, then how? I didn't find any proper resource to follow.

0 likes
3 replies
Quaque's avatar

I have read your article. In my case, I m developing an API for mobile app & web app. I have 3 types of actors - customers, partners & admins with different fields.

Where the admins have also different users like - creator, moderator, admin etc. So, I have decided to make it multiple table auth. Also I will use spatie role & permission package for the admins table.

It will be a very complicated system so that the authentication methods are also different for all actors. The customers & partners will use mobile otp & social auth & the admin users will use email & password.

I am using socialite to handle the social auth. So I request you to tell me that am I planning right?

rodrigo.pedra's avatar

Per your descriptions, and adding the discussing from the other thread I linked, it seems right =)

2 likes

Please or to participate in this conversation.