Skip to content
Open
6 changes: 4 additions & 2 deletions modules/next/src/Controller/NextSiteEntityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Drupal\next\Controller;

use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Url;
use Drupal\next\Entity\NextSiteInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Request;
Expand Down Expand Up @@ -56,10 +57,11 @@ public function environmentVariables(NextSiteInterface $next_site) {
'NEXT_IMAGE_DOMAIN' => $this->request->getHost(),
];

$path = Url::fromRoute('entity.consumer.collection')->toString();
$variables += [
'authentication_bearer' => '# Authentication',
'DRUPAL_CLIENT_ID' => 'Retrieve this from /admin/config/services/consumer',
'DRUPAL_CLIENT_SECRET' => 'Retrieve this from /admin/config/services/consumer',
'DRUPAL_CLIENT_ID' => 'Retrieve this from ' . $path,
'DRUPAL_CLIENT_SECRET' => 'Retrieve this from ' . $path,
];

if ($secret = $next_site->getPreviewSecret()) {
Expand Down