code: public function isValidForgotten(string $hash): bool
      {
          $decode = $this->getDecodeHash($hash);
  
          $id = (int) $decode['id'];
          $verifyHash = $decode['verifyHash'];
  
          $item = $this->getById($id);  // load row from db
          if ($item && $id == $item['id']) { // not null result
              // check hash and password
              return $this->verifyHash($item['id'] . $item['login'], $verifyHash);
          }
          return false;
      }
docs: Is valid forgotten.
  
  @param string $hash
  @return bool
  @throws IdentityException