Created on 7 November 2023, 8 months ago
Updated 27 April 2024, 2 months ago

While trying to login using LinkedIn,getting error as "you are not authorised to access this".

When debugged the issue ,found that linkedin has recently updated its sigin procedure.Now the signin to LinkedIn is using OpenId Connect.Is this has anything to do with the error

๐Ÿ› Bug report
Status

Needs work

Version

4.0

Component

Code

Created by

๐Ÿ‡ฎ๐Ÿ‡ณIndia fatima2345

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @fatima2345
  • Eugene Bocharov โ†’ made their first commit to this issueโ€™s fork.

  • First commit to issue fork.
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 5.7
    last update 4 months ago
    4 pass
  • Status changed to Needs review 4 months ago
  • ๐Ÿ‡จ๐Ÿ‡ฆCanada NickDickinsonWilde Victoria, BC (T'So-uke lands)
  • Open in Jenkins โ†’ Open on Drupal.org โ†’
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 5.7
    last update 3 months ago
    4 pass
  • I confirm the code in the merge does fix the problem. I wanted to use it now, so I created a patch file using those same edits to LinkedInAuthManager.php.

  • Status changed to Needs work 2 months ago
  • Hello There,

    I applied the patch. But, although it solved the issue with login, if you cancel the login, the site would throw an error as follows:

    BadMethodCallException: Required parameter not passed: "code" in League\OAuth2\Client\Grant\AbstractGrant->checkRequiredParameter() (line 35 of /var/www/html/vendor/league/oauth2-client/src/Tool/RequiredParameterTrait.php).
    League\OAuth2\Client\Grant\AbstractGrant->checkRequiredParameters(Array, Array) (Line: 76)
    League\OAuth2\Client\Grant\AbstractGrant->prepareRequestParameters(Array, Array) (Line: 633)
    League\OAuth2\Client\Provider\AbstractProvider->getAccessToken(Object, Array) (Line: 47)
    Drupal\social_auth_linkedin\LinkedInAuthManager->authenticate() (Line: 298)
    Drupal\social_auth\Controller\OAuth2ControllerBase->processCallback() (Line: 195)
    Drupal\social_auth\Controller\OAuth2ControllerBase->callback(Object)
    call_user_func_array(Array, Array) (Line: 123)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 627)
    Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
    Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
    Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
    Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 58)
    Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
    Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 106)
    Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
    Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
    Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
    Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
    Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 704)
    Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
    
Production build 0.69.0 2024