Laravel 5.5 - Different tables for normal Authentication vs Passport OAuth

Posted 1 year ago by itstrueimryan

Hi there. I'm using the Users table for OAuth with Passport. I have a username, password, and a third field I'm using, and I'm using the grant type password flow. It works great, users hit the OAuth endpoint and then get an access token to use the API with. However, I need to use a different model, the Admin model, for the front-facing site.

When I change the User Provider in auth.php to:

'users' => [
    'driver' => 'eloquent',
    'model' => App\Admin::class,

It breaks the Passport stuff. Looking for recommendations on how to approach this issue. Thanks.

Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.