diff --git a/src/MongodbPassportServiceProvider.php b/src/MongodbPassportServiceProvider.php index 37723a3..d2ea11b 100644 --- a/src/MongodbPassportServiceProvider.php +++ b/src/MongodbPassportServiceProvider.php @@ -23,6 +23,7 @@ public function register() Passport::useClientModel(Client::class); Passport::usePersonalAccessClientModel(PersonalAccessClient::class); Passport::useTokenModel(Token::class); + Passport::useRefreshTokenModel(RefreshToken::class); $this->app->bind(PassportRefreshTokenRepository::class, function () { return $this->app->make(RefreshTokenRepository::class); diff --git a/src/Passport/Bridge/RefreshTokenRepository.php b/src/Passport/Bridge/RefreshTokenRepository.php index f0805ab..470302c 100644 --- a/src/Passport/Bridge/RefreshTokenRepository.php +++ b/src/Passport/Bridge/RefreshTokenRepository.php @@ -5,6 +5,7 @@ use Laravel\Passport\Bridge\RefreshTokenRepository as BaseRefreshTokenRepository; use Laravel\Passport\Events\RefreshTokenCreated; use League\OAuth2\Server\Entities\RefreshTokenEntityInterface; +use Illuminate\Support\Facades\DB; /** * Class RefreshTokenRepository @@ -25,7 +26,7 @@ public function getNewRefreshToken() */ public function isRefreshTokenRevoked($tokenId) { - $refreshToken = $this->database->table('oauth_refresh_tokens') + $refreshToken = DB::table('oauth_refresh_tokens') ->where('id', $tokenId)->first(); return $refreshToken === null || $refreshToken['revoked'];