Laravel passport is a great package to authenticate your user to your web or mobile app. It uses the OAuth2 package by phpleague underneath. It should solve most of the API developers problem on the authentication side.

While Laravel Passport is useful to most developers, it is still a puzzle on how to authenticate multiple (user) models within it since underneath(by default), it looks on the users table only.

A recent update on the package allows you to specify a custom provider so you can hack a bit on the framework to look on which table in the database.

Check it out in my Github account —

Senior Fullstack Engineer