Missing argument 1 for Illuminate\Auth\AuthManager::createDriver() lumen and JWT

Posted 3 years ago by CROSP

I am trying to implement JWT token in my API using Lumen + JWT. I am using this JWT Library, I have set up it, but when I want to validate passed using JWTAuth::attempt($credentials) I get next error

ErrorException in AuthManager.php line 16: Missing argument 1 for Illuminate\Auth\AuthManager::createDriver(), called in /home/admin/web/ on line 87 and defined

I know where is the problem, but cannot figure out how to solve it because I don't know internals of framework well.

I have question about how does JWT authenticate the user (checks credentials in database, as I can gues it uses model class provided in jwt.php with the following line 'user' => 'App\Models\User'

By default 'user' => 'App\User'

So even if I changed user model in this file I got the next error

vendor/illuminate/auth/EloquentUserProvider.php line 126: Class '\App\User' not found

I thought and decided to add config/auth.php file with succeeding content

return [ 'model' => 'App\Models\User' ];

And now I get the the first exception.

What is wrong I can quess that I have overridden all parameters in auth config file.

Aslo I wonder where can I find (except source code, it will take a lot of time to understand it) explanation how JWTAuth::attempt works ?


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.