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

aliabdalla's avatar

API multiple auth

hi i want to build multiple API auth system which as example user, admin, doctor, so i want to build for each one of this and let the user login and register, the problem is i have try to use passport and jwt and face some problems like the user when i login give me unauthorized i think because it use the user model note my won model that i have create so i want full description or tutorial in this point

0 likes
2 replies
bugsysha's avatar

I think this is in most cases over complication of a problem and would try to avoid it at any cost.

1 like
ahoi's avatar

Would it be a possibility to use one API auth system that authenticates a user that can have different roles and access levels?

Please or to participate in this conversation.