Commit fac1c374 authored by Zorn's avatar Zorn

Do not pass empty auth params

parent fc76096a
......@@ -5,7 +5,7 @@
<name>Social Login</name>
<summary>Social login via OAuth or OpenID</summary>
<description></description>
<version>1.11.0</version>
<version>1.11.1</version>
<licence>agpl</licence>
<author>zorn-v</author>
<namespace>SocialLogin</namespace>
......
......@@ -100,8 +100,12 @@ class LoginController extends Controller
if (isset($scopes[$provider])) {
$config['scope'] = $scopes[$provider];
}
if (!empty($prov['auth_params'])) {
$config['authorize_url_parameters'] = $prov['auth_params'];
if (isset($prov['auth_params']) && is_array($prov['auth_params'])) {
foreach ($prov['auth_params'] as $k => $v) {
if (!empty($v)) {
$config['authorize_url_parameters'][$k] = $v;
}
}
}
break;
}
......
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