diff --git a/access_unpublished.module b/access_unpublished.module
index 7c69fff..f35cfcd 100644
--- a/access_unpublished.module
+++ b/access_unpublished.module
@@ -18,15 +18,12 @@ module_load_include('inc', 'access_unpublished', 'access_unpublished.tokens');
  * Implements hook_entity_access().
  */
 function access_unpublished_entity_access(EntityInterface $entity, $operation, AccountInterface $account) {
-
   $tokenKey = \Drupal::config('access_unpublished.settings')->get('hash_key');
-
   if (
     $operation == 'view' &&
     \Drupal::request()->query->has($tokenKey) &&
     $entity instanceof EntityPublishedInterface &&
-    $account->hasPermission('access_unpublished ' . $entity->getEntityTypeId() . ' ' . $entity->bundle()) &&
-    !$entity->isPublished()
+    $account->hasPermission('access_unpublished ' . $entity->getEntityTypeId() . ' ' . $entity->bundle())
   ) {
 
     $query = \Drupal::entityQuery('access_token');
@@ -44,8 +41,8 @@ function access_unpublished_entity_access(EntityInterface $entity, $operation, A
 
       return AccessResult::allowedIf(!$token->isExpired())
         ->cachePerPermissions()
+        ->addCacheableDependency($token)
         ->setCacheMaxAge($token->get('expire')->value - REQUEST_TIME);
-
     }
   }
   return AccessResult::neutral();
@@ -55,7 +52,6 @@ function access_unpublished_entity_access(EntityInterface $entity, $operation, A
  * Implements hook_form_alter().
  */
 function access_unpublished_form_alter(&$form, FormStateInterface $form_state, $form_id) {
-
   \Drupal::service('class_resolver')
     ->getInstanceFromDefinition(AccessUnpublishedForm::class)
     ->formAlter($form, $form_state, $form_id);
diff --git a/access_unpublished.services.yml b/access_unpublished.services.yml
index 0979ba5..1912505 100644
--- a/access_unpublished.services.yml
+++ b/access_unpublished.services.yml
@@ -4,3 +4,4 @@ services:
     arguments:
       - '@config.factory'
       - '@entity_type.manager'
+      - '@?content_moderation.moderation_information'
diff --git a/src/Access/LatestRevisionCheck.php b/src/Access/LatestRevisionCheck.php
new file mode 100644
index 0000000..8531fa5
--- /dev/null
+++ b/src/Access/LatestRevisionCheck.php
@@ -0,0 +1,25 @@
+<?php
+
+namespace Drupal\access_unpublished\Access;
+
+use Drupal\Core\Routing\RouteMatchInterface;
+use Drupal\Core\Session\AccountInterface;
+use Symfony\Component\Routing\Route;
+use Drupal\content_moderation\Access\LatestRevisionCheck as LatestRevisionCheckBase;
+
+/**
+ * Access check for the entity moderation tab.
+ */
+class LatestRevisionCheck extends LatestRevisionCheckBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function access(Route $route, RouteMatchInterface $route_match, AccountInterface $account) {
+
+    $access_result = parent::access($route, $route_match, $account);
+    $entity = $this->loadEntity($route, $route_match);
+    return $access_result->orIf(access_unpublished_entity_access($entity, 'view', $account));
+  }
+
+}
diff --git a/src/AccessTokenManager.php b/src/AccessTokenManager.php
index 4f0abc2..5c7dc14 100644
--- a/src/AccessTokenManager.php
+++ b/src/AccessTokenManager.php
@@ -2,10 +2,10 @@
 
 namespace Drupal\access_unpublished;
 
+use Drupal\content_moderation\ModerationInformationInterface;
 use Drupal\Core\Config\ConfigFactoryInterface;
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
-use Drupal\Core\Url;
 
 /**
  * Class AccessTokenManager.
@@ -26,6 +26,13 @@ class AccessTokenManager {
    */
   protected $entityTypeManager;
 
+  /**
+   * The moderation information service.
+   *
+   * @var \Drupal\content_moderation\ModerationInformationInterface
+   */
+  protected $moderationInfo;
+
   /**
    * AccessTokenManager constructor.
    *
@@ -33,10 +40,13 @@ class AccessTokenManager {
    *   The config factory.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
    *   The entity type manager.
+   * @param \Drupal\content_moderation\ModerationInformationInterface $moderationInformation
+   *   The moderation information service.
    */
-  public function __construct(ConfigFactoryInterface $configFactory, EntityTypeManagerInterface $entityTypeManager) {
+  public function __construct(ConfigFactoryInterface $configFactory, EntityTypeManagerInterface $entityTypeManager, ModerationInformationInterface $moderationInformation = NULL) {
     $this->configFactory = $configFactory;
     $this->entityTypeManager = $entityTypeManager;
+    $this->moderationInfo = $moderationInformation;
   }
 
   /**
@@ -98,17 +108,14 @@ class AccessTokenManager {
   public function getAccessTokenUrl(EntityInterface $entity, AccessTokenInterface $token) {
     $tokenKey = $this->configFactory->get('access_unpublished.settings')->get('hash_key');
 
-    $url = Url::fromRoute('entity.' . $entity->getEntityType()->id() . '.canonical',
-      [
-        $entity->getEntityType()->id() => $entity->id(),
-        $tokenKey => $token->get('value')->value,
-      ],
-      [
-        'absolute' => TRUE,
-      ]
-    )->toString();
-
-    return $url;
+    $rel = 'canonical';
+    if ($this->moderationInfo && $this->moderationInfo->hasPendingRevision($entity) && $entity->getEntityType()->hasLinkTemplate('latest-version')) {
+      $rel = 'latest-version';
+    }
+    return $entity->toUrl($rel, [
+      'query' => [$tokenKey => $token->get('value')->value],
+      'absolute' => TRUE,
+    ])->toString();
   }
 
 }
diff --git a/src/AccessUnpublishedServiceProvider.php b/src/AccessUnpublishedServiceProvider.php
new file mode 100644
index 0000000..7d81ff0
--- /dev/null
+++ b/src/AccessUnpublishedServiceProvider.php
@@ -0,0 +1,28 @@
+<?php
+/**
+ * @file
+ * Contains
+ */
+
+namespace Drupal\access_unpublished;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceProviderBase;
+
+/**
+ * Modifies the language manager service.
+ */
+class AccessUnpublishedServiceProvider extends ServiceProviderBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+
+    if ($container->hasDefinition('access_check.latest_revision')) {
+      $definition = $container->getDefinition('access_check.latest_revision');
+      $definition->setClass('Drupal\access_unpublished\Access\LatestRevisionCheck');
+    }
+
+  }
+}
