Commit 93d0fdfa authored by Mario Steinitz's avatar Mario Steinitz Committed by Joao Ventura
Browse files

Issue #2946869 by Mario Steinitz, sun, joelseguin, jcnventura: Cannot log in using facebook client

parent e4c846a6
......@@ -236,6 +236,12 @@ class OpenIDConnect {
];
$this->moduleHandler->alter('openid_connect_userinfo', $userinfo, $context);
// Whether we have no usable user information.
if (empty($user_data) && empty($userinfo)) {
$this->logger->error('No user information provided by @provider (@code @error). Details: @details', ['@provider' => $provider]);
return FALSE;
}
if ($userinfo && empty($userinfo['email'])) {
$this->logger->error('No e-mail address provided by @provider (@code @error). Details: @details', ['@provider' => $provider]);
return FALSE;
......
......@@ -24,7 +24,7 @@ class OpenIDConnectFacebookClient extends OpenIDConnectClientBase {
* @var array
*/
protected $versions = [
'v2.11', 'v2.10', 'v2.9', 'v2.8', 'v2.7', 'v2.6', 'v2.5', 'v2.4', 'v2.3',
'v2.12', 'v2.11', 'v2.10', 'v2.9', 'v2.8', 'v2.7', 'v2.6', 'v2.5', 'v2.4', 'v2.3',
];
/**
......@@ -33,8 +33,7 @@ class OpenIDConnectFacebookClient extends OpenIDConnectClientBase {
* @var array
*/
protected $fields = [
'id', 'name', 'email', 'first_name', 'last_name', 'gender', 'locale',
'timezone', 'picture',
'id', 'name', 'email', 'first_name', 'last_name', 'gender', 'locale', 'timezone', 'picture',
];
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment