diff --git a/ctools.services.yml b/ctools.services.yml
index 046813b..eaa38b8 100644
--- a/ctools.services.yml
+++ b/ctools.services.yml
@@ -31,3 +31,8 @@ services:
   ctools.context_mapper:
     class: Drupal\ctools\ContextMapper
     arguments: ['@entity.repository']
+  ctools.serializable.tempstore.factory:
+    class: Drupal\ctools\SerializableTempstoreFactory
+    arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%user.tempstore.expire%']
+    tags:
+      - { name: backend_overridable }
diff --git a/src/SerializableTempstore.php b/src/SerializableTempstore.php
new file mode 100644
index 0000000..65567ed
--- /dev/null
+++ b/src/SerializableTempstore.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace Drupal\ctools;
+
+use Drupal\Core\DependencyInjection\DependencySerializationTrait;
+use Drupal\user\SharedTempStore;
+
+/**
+ * An extension of the SharedTempStore system for serialized data.
+ */
+class SerializableTempstore extends SharedTempStore {
+  use DependencySerializationTrait;
+}
diff --git a/src/SerializableTempstoreFactory.php b/src/SerializableTempstoreFactory.php
new file mode 100644
index 0000000..b06ffb6
--- /dev/null
+++ b/src/SerializableTempstoreFactory.php
@@ -0,0 +1,27 @@
+<?php
+
+namespace Drupal\ctools;
+
+use Drupal\user\SharedTempStoreFactory;
+
+/**
+ * A factory for creating SerializableTempstore objects.
+ */
+class SerializableTempstoreFactory extends SharedTempStoreFactory {
+
+  /**
+   * {@inheritdoc}
+   */
+  function get($collection, $owner = NULL) {
+    // Use the currently authenticated user ID or the active user ID unless the
+    // owner is overridden.
+    if (!isset($owner)) {
+      $owner = \Drupal::currentUser()->id() ?: session_id();
+    }
+
+    // Store the data for this collection in the database.
+    $storage = $this->storageFactory->get("user.shared_tempstore.$collection");
+    return new SerializableTempstore($storage, $this->lockBackend, $owner, $this->requestStack, $this->expire);
+  }
+
+}
