diff --git a/src/Controller/PbsAuthController.php b/src/Controller/PbsAuthController.php index 2bb4654..7244516 100644 --- a/src/Controller/PbsAuthController.php +++ b/src/Controller/PbsAuthController.php @@ -4,6 +4,7 @@ use Drupal\Component\Serialization\Json; use Drupal\Core\Messenger\MessengerInterface; +use Drupal\Core\Render\RendererInterface; use Drupal\social_api\Plugin\NetworkManager; use Drupal\social_auth\Controller\OAuth2ControllerBase; use Drupal\social_auth\SocialAuthDataHandler; @@ -41,6 +42,8 @@ class PbsAuthController extends OAuth2ControllerBase { * SocialAuthDataHandler object. * @param \Drupal\Component\Serialization\Json $json_serializer * Used to serialize additional data. + * @param \Drupal\Core\Render\RendererInterface $renderer + * Used to handle metadata for redirection to authentication URL. */ public function __construct(MessengerInterface $messenger, NetworkManager $network_manager, @@ -48,7 +51,8 @@ public function __construct(MessengerInterface $messenger, PbsAuthManager $pbs_auth_manager, RequestStack $request, SocialAuthDataHandler $data_handler, - Json $json_serializer) { + Json $json_serializer, + RendererInterface $renderer) { parent::__construct( 'Social Auth PBS', @@ -58,7 +62,8 @@ public function __construct(MessengerInterface $messenger, $user_authenticator, $pbs_auth_manager, $request, - $data_handler + $data_handler, + $renderer ); $this->jsonSerializer = $json_serializer; } @@ -74,7 +79,8 @@ public static function create(ContainerInterface $container) { $container->get('social_auth_pbs.manager'), $container->get('request_stack'), $container->get('social_auth.data_handler'), - $container->get('serialization.json') + $container->get('serialization.json'), + $container->get('renderer') ); }