Thanks for the detailed answer.
After testing the Registration inline-hook, the function getUser() in https://github.com/dragosgaftoneanu/okta-inline-hooks/blob/master/registration-inline-hook/index.php should be changed to:
public function getUser()
{
return $this->request[‘data’][‘userProfile’];
}