Went through all the setup and installation, got all my apis and connecting to google. However it’s throwing and error message. So I debugged it some and at a lose or brain dead at the moment.
Traced it to the following function.
public function findExistingForSocialLogin(\Cake\ORM\Query\SelectQuery $query, array $options)
{
debug($options);
debug($options['email']);
exit;
return $query->where([
$this->_table->aliasField('email') => $options['email'],
]);
}
It’s been years since I’ve touched programming, last time I touched CakePHP was back in early version 3. I knew it had to be something stupid I was just over looking and not seeing what was right in front of me.
But anyways then there is a bug in the CakeDC/Users plugin.
\cakedc\users\src\Model\Behavior\SocialBehavior.php
public function findExistingForSocialLogin(\Cake\ORM\Query\SelectQuery $query, array $options)
{
return $query->where([
$this->_table->aliasField('email') => $options['email'],
]);
}
Should be.
public function findExistingForSocialLogin(\Cake\ORM\Query\SelectQuery $query, array $options)
{
return $query->where([
$this->_table->aliasField('email') => $options['options']['email'],
]);
}