Open iamnimnul opened 6 years ago
I'm having the same issue. As you said, replacing the line 77 in JWTGuard.php
from $this->jwt->checkProvider($this->provider->getModel())
to $this->jwt->checkProvider(config('auth.providers.users.model'))
seems to fix this issue.
It's fixed with laravel-doctrine 1.4.3 released 8 days ago composer update
should do the job now ;)
Missing getModel()
function is added https://github.com/laravel-doctrine/orm/blob/1.4.3/src/Auth/DoctrineUserProvider.php#L140
Hi there.
In my current configuration I am using: "laravel/framework": "5.5.", "laravel-doctrine/orm": "1.4.", "tymon/jwt-auth": "^1.0.0-rc.1"
After installing JWT I spotted an issue.
Call to undefined method LaravelDoctrine\\ORM\\Auth\\DoctrineUserProvider::getModel()
Tymon\JWTAuth\JWTGuard
in line 77 https://github.com/tymondesigns/jwt-auth/blob/develop/src/JWTGuard.php#L77 says$this->jwt->checkProvider($this->provider->getModel())
. This code is assuming that user provider will implementgetModel()
function likeEloquentUserProvider
does https://github.com/laravel/framework/blob/5.5/src/Illuminate/Auth/EloquentUserProvider.php#L171, but for exampleDoctrineUserProvider.php
https://github.com/laravel-doctrine/orm/blob/1.4/src/Auth/DoctrineUserProvider.php doesn't have it. User class can be taken fromauth.php
config I believe?It's related to https://github.com/tymondesigns/jwt-auth/pull/1167/files made by @cappuc
Please let me know your thoughts. Thanks!