jadjoubran / laravel5-angular-material-starter

Get started with Laravel 5.3 and AngularJS (material)
https://laravel-angular.readme.io/
MIT License
1.66k stars 400 forks source link

Class tymon.jwt does not exits #429

Closed aceart closed 7 years ago

aceart commented 7 years ago
ReflectionException in Container.php line 749:
Class tymon.jwt does not exist
in Container.php line 749
at ReflectionClass->__construct('tymon.jwt') in Container.php line 749
at Container->build('tymon.jwt', array()) in Container.php line 644
at Container->make('tymon.jwt', array()) in Application.php line 709
at Application->make('tymon.jwt') in Container.php line 1203
at Container->offsetGet('tymon.jwt') in JwtAuthGuardServiceProvider.php line 29
at JwtAuthGuardServiceProvider->Irazasyed\JwtAuthGuard\{closure}(object(Application), 'api', array('driver' => 'jwt-auth', 'provider' => 'users')) in AuthManager.php line 111
at AuthManager->callCustomCreator('api', array('driver' => 'jwt-auth', 'provider' => 'users')) in AuthManager.php line 90
at AuthManager->resolve('api') in AuthManager.php line 70
at AuthManager->guard('api') in Authenticate.php line 61
at Authenticate->authenticate(array('api')) in Authenticate.php line 41
at Authenticate->handle(object(Request), object(Closure), 'api') in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Router.php line 644
at Router->runRouteWithinStack(object(Route), object(Request)) in Router.php line 618
at Router->dispatchToRoute(object(Request)) in Router.php line 596
at Router->dispatch(object(Request)) in Kernel.php line 267
at Kernel->Illuminate\Foundation\Http\{closure}(object(Request)) in Pipeline.php line 53
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in CheckForMaintenanceMode.php line 46
at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137
at Pipeline->Illuminate\Pipeline\{closure}(object(Request)) in Pipeline.php line 33
at Pipeline->Illuminate\Routing\{closure}(object(Request)) in Pipeline.php line 104
at Pipeline->then(object(Closure)) in Kernel.php line 149
at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 116
at Kernel->handle(object(Request)) in index.php line 53

You can reproduce this by following steps:

Route::group(['middleware' => ['api', 'auth:api']], function ($api) {
   $api->post('auth/password/email', 'Auth\PasswordResetController@sendResetLinkEmail');
});

I tried following solution, mentioned by bayssmekanique https://github.com/irazasyed/jwt-auth-guard/issues/5#issuecomment-175152252 with no success. It throws no error but returns unauthorized

Besides that - Thank you very much for your awsome work :)

jadjoubran commented 7 years ago

Hi @aceart Thanks for reporting this There is an easy temporary workaround in this issue #425 I would like to solve it properly and I also tried the fix you mentioned but it didn't work I'm hoping to try again as soon as I have a bit of free time I'll close this as a duplicate, feel free to share more info if you've got any Cheers!

jadjoubran commented 7 years ago

Issue fixed