diff --git a/src/OAuth2/GrantType/RefreshToken.php b/src/OAuth2/GrantType/RefreshToken.php
index <HASH>..<HASH> 100644
--- a/src/OAuth2/GrantType/RefreshToken.php
+++ b/src/OAuth2/GrantType/RefreshToken.php
@@ -60,7 +60,7 @@ class RefreshToken implements GrantTypeInterface
 
     public function getUserId()
     {
-        return $this->refreshToken['user_id'];
+        return isset($this->refreshToken['user_id']) ? $this->refreshToken['user_id'] : null;
     }
 
     public function getScope()
make user_id not required for refresh_token grant