Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Auth guard driver [api] is not defined. Lumen, Dingo, JWTAuth

I am trying to develop a rest api using lumen. For authentication I am using Dingo and JWTAuth api, but I am getting the following message:

Auth guard driver [api] is not defined.

Below is a screenshot of the message from Postman, including the stacktrace.

Postman screenshot of error

like image 407
sharif rahman Avatar asked Mar 05 '17 09:03

sharif rahman


1 Answers

In your bootstrap/app.php file, make sure the following line is uncommented:

$app->register(App\Providers\AuthServiceProvider::class);

This will cause the api auth driver to be registered.

like image 78
patricus Avatar answered Oct 10 '22 14:10

patricus