cross-solution / YAWIK

YAWIK is a web application. It can be used as an ATS applicant tracking system or as a jobboard.
https://yawik.org
MIT License
124 stars 67 forks source link

Login with LinkedIn does not work #366

Closed cbleek closed 7 years ago

cbleek commented 7 years ago

After the HybridAuth Upgrade, the Login with LinkedIn does not work any more. The following exception occurse, if you try to login into the Demo using linkedin.

Note: I had to change the key of the "LinkedIn" section of the hybridauth array from "key" to "id". In addition, I've chaned the scope to "r_basicprofile,r_emailaddress"

    "LinkedIn" => array (
        "enabled" => "true",
        "keys"    => array ( "id" => "xxxxx", "secret" => "xxxxxx" ),
        "scope"   => "r_basicprofile,r_emailaddress"
    ),

Exception Datei: /data/www/clients/client1/web1/YAWIK/vendor/hybridauth/hybridauth/hybridauth/Hybrid/Auth.php:169 Nachricht: User profile request failed! LinkedIn returned an error: The Authorization Service has return: missing_parameter Stapelverlauf:

0 /data/www/clients/client1/web1/YAWIK/vendor/hybridauth/hybridauth/hybridauth/Hybrid/Auth.php(55): Hybrid_Auth::initialize(Array)

1 /data/www/clients/client1/web1/YAWIK/module/Auth/src/Auth/Factory/Service/HybridAuthFactory.php(68): Hybrid_Auth->__construct(Array)

2 /data/www/clients/client1/web1/YAWIK/module/Auth/src/Auth/Factory/Service/HybridAuthFactory.php(80): Auth\Factory\Service\HybridAuthFactory->__invoke(Object(Zend\ServiceManager\ServiceManager), 'Hybrid_Auth')

3 [internal function]: Auth\Factory\Service\HybridAuthFactory->createService(Object(Zend\ServiceManager\ServiceManager), 'hybridauth', 'HybridAuth')

4 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(934): call_user_func(Array, Object(Zend\ServiceManager\ServiceManager), 'hybridauth', 'HybridAuth')

5 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(1092): Zend\ServiceManager\ServiceManager->createServiceViaCallback(Array, 'hybridauth', 'HybridAuth')

6 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(634): Zend\ServiceManager\ServiceManager->createFromFactory('hybridauth', 'HybridAuth')

7 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(597): Zend\ServiceManager\ServiceManager->doCreate('HybridAuth', 'hybridauth')

8 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create(Array)

9 /data/www/clients/client1/web1/YAWIK/module/Auth/src/Auth/Factory/Adapter/HybridAuthAdapterFactory.php(40): Zend\ServiceManager\ServiceManager->get('HybridAuth')

10 /data/www/clients/client1/web1/YAWIK/module/Auth/src/Auth/Factory/Adapter/HybridAuthAdapterFactory.php(53): Auth\Factory\Adapter\HybridAuthAdapterFactory->__invoke(Object(Zend\ServiceManager\ServiceManager), 'Auth\Adapter\Hy...')

11 [internal function]: Auth\Factory\Adapter\HybridAuthAdapterFactory->createService(Object(Zend\ServiceManager\ServiceManager), 'hybridauthadapt...', 'HybridAuthAdapt...')

12 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(934): call_user_func(Array, Object(Zend\ServiceManager\ServiceManager), 'hybridauthadapt...', 'HybridAuthAdapt...')

13 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(1092): Zend\ServiceManager\ServiceManager->createServiceViaCallback(Array, 'hybridauthadapt...', 'HybridAuthAdapt...')

14 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(634): Zend\ServiceManager\ServiceManager->createFromFactory('hybridauthadapt...', 'HybridAuthAdapt...')

15 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(597): Zend\ServiceManager\ServiceManager->doCreate('HybridAuthAdapt...', 'hybridauthadapt...')

16 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-servicemanager/src/ServiceManager.php(530): Zend\ServiceManager\ServiceManager->create(Array)

17 /data/www/clients/client1/web1/YAWIK/module/Auth/src/Auth/Controller/IndexController.php(191): Zend\ServiceManager\ServiceManager->get('HybridAuthAdapt...')

18 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-mvc/src/Controller/AbstractActionController.php(82): Auth\Controller\IndexController->loginAction()

19 [internal function]: Zend\Mvc\Controller\AbstractActionController->onDispatch(Object(Zend\Mvc\MvcEvent))

20 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(490): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

21 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(263): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

22 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-mvc/src/Controller/AbstractController.php(118): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))

23 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-mvc/src/DispatchListener.php(118): Zend\Mvc\Controller\AbstractController->dispatch(Object(Zend\Http\PhpEnvironment\Request), Object(Zend\Http\PhpEnvironment\Response))

24 [internal function]: Zend\Mvc\DispatchListener->onDispatch(Object(Zend\Mvc\MvcEvent))

25 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(490): call_user_func(Array, Object(Zend\Mvc\MvcEvent))

26 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-eventmanager/src/EventManager.php(263): Zend\EventManager\EventManager->triggerListeners('dispatch', Object(Zend\Mvc\MvcEvent), Object(Closure))

27 /data/www/clients/client1/web1/YAWIK/vendor/zendframework/zend-mvc/src/Application.php(340): Zend\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Zend\Mvc\MvcEvent))

28 /data/www/clients/client1/web1/YAWIK/public/index.php(49): Zend\Mvc\Application->run()

29 {main}

cbleek commented 7 years ago

@fedys can you take a look at this issue?

fedys commented 7 years ago

Yes, I can look at it now. Please send me LinkedIn demo app access data.

cbleek commented 7 years ago

You should now see the the YAWIK demo app in your account

fedys commented 7 years ago

Got it, thanks.

fedys commented 7 years ago

@cbleek FYI I got a different exception: Fatal Error - Call to undefined method OAuth2Client::profile() in Auth/Controller/Plugin/SocialProfiles/LinkedIn.php on line 17. I have made several fixes and LinkedIn works as expected in my environment now. I used both YAWIK and my own linked app credentials.

cbleek commented 7 years ago

works now. Thank's a lot