Commit d0b3599e authored by Zorn's avatar Zorn

Fix social_login_auto_redirect for cli

parent 18eb8156
......@@ -5,7 +5,7 @@
<name>Social Login</name>
<summary>Social login via OAuth or OpenID</summary>
<description></description>
<version>1.9.4</version>
<version>1.9.5</version>
<licence>agpl</licence>
<author>zorn-v</author>
<namespace>SocialLogin</namespace>
......
......@@ -75,7 +75,9 @@ class Application extends App
$this->addAltLogins('custom_oidc');
$this->addAltLogins('custom_oauth2');
$useLoginRedirect = $this->providersCount === 1 && $this->config->getSystemValue('social_login_auto_redirect', false);
$useLoginRedirect = $this->providersCount === 1
&& PHP_SAPI !== 'cli'
&& $this->config->getSystemValue('social_login_auto_redirect', false);
if ($useLoginRedirect && $request->getPathInfo() === '/login') {
header('Location: ' . $this->providerUrl);
exit();
......
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