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.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.