jwt-auth: ErrorException in RequestGuard.php when use JWTAuth::attempt($credentials)

First I have problem with

BindingResolutionException in Container.php line 752: Target [Illuminate\Contracts\Routing\ResponseFactory] is not instantiable while building [Tymon\JWTAuth\Middleware\GetUserFromToken]

I try to add this code $this->app->singleton('Illuminate\Contracts\Routing\ResponseFactory', function ($app) { return new ResponseFactory($app['Illuminate\Contracts\View\Factory'], $app['Illuminate\Routing\Redirector']); }); It’s error Class Tymon\JWTAuth\Middleware\ResponseFactory not found

So I try again to back and remove useless “use” of Interface like this 532

Next when I try again, I see this error: Class Tymon\JWTAuth\Middleware\ResponseFactory does not exist

So now what must I do to resolve this.Please help me.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 16 (2 by maintainers)

Most upvoted comments

I have fixed this error. Thank you all