diff --git a/src/Auth0ResourceOwner.php b/src/Auth0ResourceOwner.php index 142f3a5..517f23c 100644 --- a/src/Auth0ResourceOwner.php +++ b/src/Auth0ResourceOwner.php @@ -23,7 +23,12 @@ public function __construct(array $response = []) */ public function getId() { - return $this->getValueByKey($this->response, 'user_id'); + $id = $this->getValueByKey($this->response, 'user_id'); + if(!$id) { + $id = $this->getValueByKey($this->response, 'sub'); + } + + return $id; } /**