diff --git a/core/core.services.yml b/core/core.services.yml
index 737009bac5..77dcdfd79c 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -41,6 +41,7 @@ parameters:
     exposedHeaders: false
     maxAge: false
     supportsCredentials: false
+  core.tempstore.expire: 604800
 services:
   # Simple cache contexts, directly derived from the request context.
   cache_context.ip:
@@ -1650,3 +1651,13 @@ services:
   messenger:
     class: Drupal\Core\Messenger\Messenger
     arguments: ['@session.flash_bag', '@page_cache_kill_switch']
+  core.private_tempstore:
+    class: Drupal\Core\TempStore\PrivateTempStoreFactory
+    arguments: ['@keyvalue.expirable', '@lock', '@current_user', '@request_stack', '%core.tempstore.expire%']
+    tags:
+      - { name: backend_overridable }
+  core.shared_tempstore:
+    class: Drupal\Core\TempStore\SharedTempStoreFactory
+    arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%core.tempstore.expire%']
+    tags:
+      - { name: backend_overridable }
diff --git a/core/lib/Drupal/Core/Session/SessionManager.php b/core/lib/Drupal/Core/Session/SessionManager.php
index 95495cfd03..607103109d 100644
--- a/core/lib/Drupal/Core/Session/SessionManager.php
+++ b/core/lib/Drupal/Core/Session/SessionManager.php
@@ -120,8 +120,9 @@ public function start() {
 
     if (empty($result)) {
       // Randomly generate a session identifier for this request. This is
-      // necessary because \Drupal\user\SharedTempStoreFactory::get() wants to
-      // know the future session ID of a lazily started session in advance.
+      // necessary because \Drupal\Core\TempStore\SharedTempStoreFactory::get()
+      // wants to know the future session ID of a lazily started session in
+      // advance.
       //
       // @todo: With current versions of PHP there is little reason to generate
       //   the session id from within application code. Consider using the
diff --git a/core/modules/user/src/PrivateTempStore.php b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php
similarity index 97%
copy from core/modules/user/src/PrivateTempStore.php
copy to core/lib/Drupal/Core/TempStore/PrivateTempStore.php
index 786ff1e449..f9d1034705 100644
--- a/core/modules/user/src/PrivateTempStore.php
+++ b/core/lib/Drupal/Core/TempStore/PrivateTempStore.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\user;
+namespace Drupal\Core\TempStore;
 
 use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
 use Drupal\Core\Lock\LockBackendInterface;
@@ -24,7 +24,7 @@
  * The PrivateTempStore differs from the SharedTempStore in that all keys are
  * ensured to be unique for a particular user and users can never share data. If
  * you want to be able to share data between users or use it for locking, use
- * \Drupal\user\SharedTempStore.
+ * \Drupal\Core\TempStore\SharedTempStore.
  */
 class PrivateTempStore {
 
@@ -113,7 +113,7 @@ public function get($key) {
    * @param mixed $value
    *   The data to store.
    *
-   * @throws \Drupal\user\TempStoreException
+   * @throws \Drupal\Core\TempStore\TempStoreException
    *   Thrown when a lock for the backend storage could not be acquired.
    */
   public function set($key, $value) {
@@ -165,7 +165,7 @@ public function getMetadata($key) {
    *   TRUE if the object was deleted or does not exist, FALSE if it exists but
    *   is not owned by $this->owner.
    *
-   * @throws \Drupal\user\TempStoreException
+   * @throws \Drupal\Core\TempStore\TempStoreException
    *   Thrown when a lock for the backend storage could not be acquired.
    */
   public function delete($key) {
diff --git a/core/modules/user/src/PrivateTempStoreFactory.php b/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php
similarity index 91%
copy from core/modules/user/src/PrivateTempStoreFactory.php
copy to core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php
index e51faf342d..4cfe1817d5 100644
--- a/core/modules/user/src/PrivateTempStoreFactory.php
+++ b/core/lib/Drupal/Core/TempStore/PrivateTempStoreFactory.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\user;
+namespace Drupal\Core\TempStore;
 
 use Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface;
 use Drupal\Core\Lock\LockBackendInterface;
@@ -48,7 +48,7 @@ class PrivateTempStoreFactory {
   protected $expire;
 
   /**
-   * Constructs a Drupal\user\PrivateTempStoreFactory object.
+   * Constructs a Drupal\Core\TempStore\PrivateTempStoreFactory object.
    *
    * @param \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $storage_factory
    *   The key/value store factory.
@@ -76,12 +76,12 @@ public function __construct(KeyValueExpirableFactoryInterface $storage_factory,
    *   The collection name to use for this key/value store. This is typically
    *   a shared namespace or module name, e.g. 'views', 'entity', etc.
    *
-   * @return \Drupal\user\PrivateTempStore
+   * @return \Drupal\Core\TempStore\PrivateTempStore
    *   An instance of the key/value store.
    */
   public function get($collection) {
     // Store the data for this collection in the database.
-    $storage = $this->storageFactory->get("user.private_tempstore.$collection");
+    $storage = $this->storageFactory->get("core.private_tempstore.$collection");
     return new PrivateTempStore($storage, $this->lockBackend, $this->currentUser, $this->requestStack, $this->expire);
   }
 
diff --git a/core/modules/user/src/SharedTempStore.php b/core/lib/Drupal/Core/TempStore/SharedTempStore.php
similarity index 96%
copy from core/modules/user/src/SharedTempStore.php
copy to core/lib/Drupal/Core/TempStore/SharedTempStore.php
index 91a622bbef..c131a80fd2 100644
--- a/core/modules/user/src/SharedTempStore.php
+++ b/core/lib/Drupal/Core/TempStore/SharedTempStore.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\user;
+namespace Drupal\Core\TempStore;
 
 use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
 use Drupal\Core\Lock\LockBackendInterface;
@@ -33,7 +33,7 @@
  * when and whether one owner can use or update another owner's data.
  *
  * If you want to be able to ensure that the data belongs to the current user,
- * use \Drupal\user\PrivateTempStore.
+ * use \Drupal\Core\TempStore\PrivateTempStore.
  */
 class SharedTempStore {
 
@@ -165,7 +165,7 @@ public function setIfNotExists($key, $value) {
    *   TRUE if the data was set, or FALSE if it already exists and is not owned
    *   by $this->user.
    *
-   * @throws \Drupal\user\TempStoreException
+   * @throws \Drupal\Core\TempStore\TempStoreException
    *   Thrown when a lock for the backend storage could not be acquired.
    */
   public function setIfOwner($key, $value) {
@@ -189,7 +189,7 @@ public function setIfOwner($key, $value) {
    * @param mixed $value
    *   The data to store.
    *
-   * @throws \Drupal\user\TempStoreException
+   * @throws \Drupal\Core\TempStore\TempStoreException
    *   Thrown when a lock for the backend storage could not be acquired.
    */
   public function set($key, $value) {
@@ -235,7 +235,7 @@ public function getMetadata($key) {
    * @param string $key
    *   The key of the data to delete.
    *
-   * @throws \Drupal\user\TempStoreException
+   * @throws \Drupal\Core\TempStore\TempStoreException
    *   Thrown when a lock for the backend storage could not be acquired.
    */
   public function delete($key) {
@@ -261,7 +261,7 @@ public function delete($key) {
    *   TRUE if the object was deleted or does not exist, FALSE if it exists but
    *   is not owned by $this->owner.
    *
-   * @throws \Drupal\user\TempStoreException
+   * @throws \Drupal\Core\TempStore\TempStoreException
    *   Thrown when a lock for the backend storage could not be acquired.
    */
   public function deleteIfOwner($key) {
diff --git a/core/modules/user/src/SharedTempStoreFactory.php b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php
similarity index 92%
copy from core/modules/user/src/SharedTempStoreFactory.php
copy to core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php
index 29f8683201..5e386fcb6b 100644
--- a/core/modules/user/src/SharedTempStoreFactory.php
+++ b/core/lib/Drupal/Core/TempStore/SharedTempStoreFactory.php
@@ -1,6 +1,6 @@
 <?php
 
-namespace Drupal\user;
+namespace Drupal\Core\TempStore;
 
 use Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface;
 use Drupal\Core\Lock\LockBackendInterface;
@@ -40,7 +40,7 @@ class SharedTempStoreFactory {
   protected $expire;
 
   /**
-   * Constructs a Drupal\user\SharedTempStoreFactory object.
+   * Constructs a Drupal\Core\TempStore\SharedTempStoreFactory object.
    *
    * @param \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $storage_factory
    *   The key/value store factory.
@@ -69,7 +69,7 @@ public function __construct(KeyValueExpirableFactoryInterface $storage_factory,
    *   SharedTempStore is owned by the currently authenticated user, or by the
    *   active anonymous session if no user is logged in.
    *
-   * @return \Drupal\user\SharedTempStore
+   * @return \Drupal\Core\TempStore\SharedTempStore
    *   An instance of the key/value store.
    */
   public function get($collection, $owner = NULL) {
@@ -80,7 +80,7 @@ public function get($collection, $owner = NULL) {
     }
 
     // Store the data for this collection in the database.
-    $storage = $this->storageFactory->get("user.shared_tempstore.$collection");
+    $storage = $this->storageFactory->get("core.shared_tempstore.$collection");
     return new SharedTempStore($storage, $this->lockBackend, $owner, $this->requestStack, $this->expire);
   }
 
diff --git a/core/modules/user/src/TempStoreException.php b/core/lib/Drupal/Core/TempStore/TempStoreException.php
similarity index 53%
rename from core/modules/user/src/TempStoreException.php
rename to core/lib/Drupal/Core/TempStore/TempStoreException.php
index 1f9c79b0e4..53c3a5935f 100644
--- a/core/modules/user/src/TempStoreException.php
+++ b/core/lib/Drupal/Core/TempStore/TempStoreException.php
@@ -1,11 +1,11 @@
 <?php
 
-namespace Drupal\user;
+namespace Drupal\Core\TempStore;
 
 /**
  * Thrown by SharedTempStore and PrivateTempStore if they cannot acquire a lock.
  *
- * @see \Drupal\user\SharedTempStore
- * @see \Drupal\user\PrivateTempStore
+ * @see \Drupal\Core\TempStore\SharedTempStore
+ * @see \Drupal\Core\TempStore\PrivateTempStore
  */
 class TempStoreException extends \Exception {}
diff --git a/core/modules/comment/src/Form/CommentAdminOverview.php b/core/modules/comment/src/Form/CommentAdminOverview.php
index 1ffa2c618a..9625cf6604 100644
--- a/core/modules/comment/src/Form/CommentAdminOverview.php
+++ b/core/modules/comment/src/Form/CommentAdminOverview.php
@@ -9,7 +9,7 @@
 use Drupal\Core\Extension\ModuleHandlerInterface;
 use Drupal\Core\Form\FormBase;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -50,7 +50,7 @@ class CommentAdminOverview extends FormBase {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -63,7 +63,7 @@ class CommentAdminOverview extends FormBase {
    *   The date formatter service.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    */
   public function __construct(EntityTypeManagerInterface $entity_type_manager, DateFormatterInterface $date_formatter, ModuleHandlerInterface $module_handler, PrivateTempStoreFactory $temp_store_factory) {
@@ -82,7 +82,7 @@ public static function create(ContainerInterface $container) {
       $container->get('entity_type.manager'),
       $container->get('date.formatter'),
       $container->get('module_handler'),
-      $container->get('user.private_tempstore')
+      $container->get('core.private_tempstore')
     );
   }
 
diff --git a/core/modules/comment/src/Form/ConfirmDeleteMultiple.php b/core/modules/comment/src/Form/ConfirmDeleteMultiple.php
index 83f188949e..f986b307b5 100644
--- a/core/modules/comment/src/Form/ConfirmDeleteMultiple.php
+++ b/core/modules/comment/src/Form/ConfirmDeleteMultiple.php
@@ -3,7 +3,7 @@
 namespace Drupal\comment\Form;
 
 use Drupal\comment\CommentStorageInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
@@ -19,7 +19,7 @@ class ConfirmDeleteMultiple extends ConfirmFormBase {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -42,7 +42,7 @@ class ConfirmDeleteMultiple extends ConfirmFormBase {
    *
    * @param \Drupal\comment\CommentStorageInterface $comment_storage
    *   The comment storage.
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    */
   public function __construct(CommentStorageInterface $comment_storage, PrivateTempStoreFactory $temp_store_factory) {
@@ -56,7 +56,7 @@ public function __construct(CommentStorageInterface $comment_storage, PrivateTem
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('entity.manager')->getStorage('comment'),
-      $container->get('user.private_tempstore')
+      $container->get('core.private_tempstore')
     );
   }
 
diff --git a/core/modules/comment/src/Plugin/Action/DeleteComment.php b/core/modules/comment/src/Plugin/Action/DeleteComment.php
index 675b021809..69bb16c2b7 100644
--- a/core/modules/comment/src/Plugin/Action/DeleteComment.php
+++ b/core/modules/comment/src/Plugin/Action/DeleteComment.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Action\ActionBase;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Session\AccountInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -23,7 +23,7 @@ class DeleteComment extends ActionBase implements ContainerFactoryPluginInterfac
   /**
    * The tempstore object.
    *
-   * @var \Drupal\user\PrivateTempStore
+   * @var \Drupal\Core\TempStore\PrivateTempStore
    */
   protected $tempStore;
 
@@ -43,7 +43,7 @@ class DeleteComment extends ActionBase implements ContainerFactoryPluginInterfac
    *   The plugin ID for the plugin instance.
    * @param array $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    * @param \Drupal\Core\Session\AccountInterface $current_user
    *   The current user.
@@ -62,7 +62,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $configuration,
       $plugin_id,
       $plugin_definition,
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('current_user')
     );
   }
diff --git a/core/modules/image/src/Controller/QuickEditImageController.php b/core/modules/image/src/Controller/QuickEditImageController.php
index aa49bc7d3c..2ae2e566bc 100644
--- a/core/modules/image/src/Controller/QuickEditImageController.php
+++ b/core/modules/image/src/Controller/QuickEditImageController.php
@@ -10,7 +10,7 @@
 use Drupal\Core\Render\Element\StatusMessages;
 use Drupal\Core\Render\RendererInterface;
 use Drupal\image\Plugin\Field\FieldType\ImageItem;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Symfony\Component\HttpKernel\Exception\BadRequestHttpException;
@@ -23,7 +23,7 @@ class QuickEditImageController extends ControllerBase {
   /**
    * Stores The Quick Edit tempstore.
    *
-   * @var \Drupal\user\PrivateTempStore
+   * @var \Drupal\Core\TempStore\PrivateTempStore
    */
   protected $tempStore;
 
@@ -48,7 +48,7 @@ class QuickEditImageController extends ControllerBase {
    *   The renderer.
    * @param \Drupal\Core\Image\ImageFactory $image_factory
    *   The image factory.
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    */
   public function __construct(RendererInterface $renderer, ImageFactory $image_factory, PrivateTempStoreFactory $temp_store_factory) {
@@ -64,7 +64,7 @@ public static function create(ContainerInterface $container) {
     return new static(
       $container->get('renderer'),
       $container->get('image.factory'),
-      $container->get('user.private_tempstore')
+      $container->get('core.private_tempstore')
     );
   }
 
diff --git a/core/modules/layout_builder/layout_builder.services.yml b/core/modules/layout_builder/layout_builder.services.yml
index b71f6b1887..cdd08416a9 100644
--- a/core/modules/layout_builder/layout_builder.services.yml
+++ b/core/modules/layout_builder/layout_builder.services.yml
@@ -1,7 +1,7 @@
 services:
   layout_builder.tempstore_repository:
     class: Drupal\layout_builder\LayoutTempstoreRepository
-    arguments: ['@user.shared_tempstore', '@entity_type.manager']
+    arguments: ['@core.shared_tempstore', '@entity_type.manager']
   access_check.entity.layout:
     class: Drupal\layout_builder\Access\LayoutSectionAccessCheck
     tags:
diff --git a/core/modules/layout_builder/src/LayoutTempstoreRepository.php b/core/modules/layout_builder/src/LayoutTempstoreRepository.php
index 87baa1331c..cccf9e434f 100644
--- a/core/modules/layout_builder/src/LayoutTempstoreRepository.php
+++ b/core/modules/layout_builder/src/LayoutTempstoreRepository.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Entity\EntityInterface;
 use Drupal\Core\Entity\EntityTypeManagerInterface;
 use Drupal\Core\Entity\RevisionableInterface;
-use Drupal\user\SharedTempStoreFactory;
+use Drupal\Core\TempStore\SharedTempStoreFactory;
 
 /**
  * Provides a mechanism for loading layouts from tempstore.
@@ -17,7 +17,7 @@ class LayoutTempstoreRepository implements LayoutTempstoreRepositoryInterface {
   /**
    * The shared tempstore factory.
    *
-   * @var \Drupal\user\SharedTempStoreFactory
+   * @var \Drupal\Core\TempStore\SharedTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -31,7 +31,7 @@ class LayoutTempstoreRepository implements LayoutTempstoreRepositoryInterface {
   /**
    * LayoutTempstoreRepository constructor.
    *
-   * @param \Drupal\user\SharedTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\SharedTempStoreFactory $temp_store_factory
    *   The shared tempstore factory.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
    *   The entity type manager.
@@ -107,7 +107,7 @@ protected function generateTempstoreId(EntityInterface $entity) {
    * @param \Drupal\Core\Entity\EntityInterface $entity
    *   The entity being stored.
    *
-   * @return \Drupal\user\SharedTempStore
+   * @return \Drupal\Core\TempStore\SharedTempStore
    *   The tempstore.
    */
   protected function getTempstore(EntityInterface $entity) {
diff --git a/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php b/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php
index a652d4a56d..e31666c321 100644
--- a/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php
+++ b/core/modules/layout_builder/tests/src/Unit/LayoutTempstoreRepositoryTest.php
@@ -9,8 +9,8 @@
 use Drupal\Core\Language\Language;
 use Drupal\layout_builder\LayoutTempstoreRepository;
 use Drupal\Tests\UnitTestCase;
-use Drupal\user\SharedTempStore;
-use Drupal\user\SharedTempStoreFactory;
+use Drupal\Core\TempStore\SharedTempStore;
+use Drupal\Core\TempStore\SharedTempStoreFactory;
 
 /**
  * @coversDefaultClass \Drupal\layout_builder\LayoutTempstoreRepository
diff --git a/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php b/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php
index 616a567e3c..0ab0a12b0d 100644
--- a/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php
+++ b/core/modules/media/src/Form/MediaDeleteMultipleConfirmForm.php
@@ -6,7 +6,7 @@
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 
@@ -27,7 +27,7 @@ class MediaDeleteMultipleConfirmForm extends ConfirmFormBase {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -41,7 +41,7 @@ class MediaDeleteMultipleConfirmForm extends ConfirmFormBase {
   /**
    * Constructs a MediaDeleteMultipleConfirmForm form object.
    *
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    * @param \Drupal\Core\Entity\EntityTypeManagerInterface $manager
    *   The entity type manager.
@@ -56,7 +56,7 @@ public function __construct(PrivateTempStoreFactory $temp_store_factory, EntityT
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('entity_type.manager')
     );
   }
diff --git a/core/modules/node/node.services.yml b/core/modules/node/node.services.yml
index 2ff32c3e72..1e01c3093b 100644
--- a/core/modules/node/node.services.yml
+++ b/core/modules/node/node.services.yml
@@ -30,7 +30,7 @@ services:
       - { name: event_subscriber }
   node_preview:
     class: Drupal\node\ParamConverter\NodePreviewConverter
-    arguments: ['@user.private_tempstore']
+    arguments: ['@core.private_tempstore']
     tags:
       - { name: paramconverter }
     lazy: true
diff --git a/core/modules/node/src/Form/DeleteMultiple.php b/core/modules/node/src/Form/DeleteMultiple.php
index 8bc8f0685d..2525204eba 100644
--- a/core/modules/node/src/Form/DeleteMultiple.php
+++ b/core/modules/node/src/Form/DeleteMultiple.php
@@ -6,7 +6,7 @@
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RedirectResponse;
 
@@ -27,7 +27,7 @@ class DeleteMultiple extends ConfirmFormBase {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -41,7 +41,7 @@ class DeleteMultiple extends ConfirmFormBase {
   /**
    * Constructs a DeleteMultiple form object.
    *
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    * @param \Drupal\Core\Entity\EntityManagerInterface $manager
    *   The entity manager.
@@ -56,7 +56,7 @@ public function __construct(PrivateTempStoreFactory $temp_store_factory, EntityM
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('entity.manager')
     );
   }
diff --git a/core/modules/node/src/NodeForm.php b/core/modules/node/src/NodeForm.php
index 0513d1f758..a1b9ebc7fb 100644
--- a/core/modules/node/src/NodeForm.php
+++ b/core/modules/node/src/NodeForm.php
@@ -8,7 +8,7 @@
 use Drupal\Core\Entity\EntityTypeBundleInfoInterface;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Session\AccountInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -21,7 +21,7 @@ class NodeForm extends ContentEntityForm {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -37,7 +37,7 @@ class NodeForm extends ContentEntityForm {
    *
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The entity manager.
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
    *   The entity type bundle service.
@@ -58,7 +58,7 @@ public function __construct(EntityManagerInterface $entity_manager, PrivateTempS
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('entity.manager'),
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('entity_type.bundle.info'),
       $container->get('datetime.time'),
       $container->get('current_user')
diff --git a/core/modules/node/src/ParamConverter/NodePreviewConverter.php b/core/modules/node/src/ParamConverter/NodePreviewConverter.php
index b75d062629..a40301a404 100644
--- a/core/modules/node/src/ParamConverter/NodePreviewConverter.php
+++ b/core/modules/node/src/ParamConverter/NodePreviewConverter.php
@@ -2,7 +2,7 @@
 
 namespace Drupal\node\ParamConverter;
 
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\Routing\Route;
 use Drupal\Core\ParamConverter\ParamConverterInterface;
 
@@ -14,14 +14,14 @@ class NodePreviewConverter implements ParamConverterInterface {
   /**
    * Stores the tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
   /**
    * Constructs a new NodePreviewConverter.
    *
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    */
   public function __construct(PrivateTempStoreFactory $temp_store_factory) {
diff --git a/core/modules/node/src/Plugin/Action/DeleteNode.php b/core/modules/node/src/Plugin/Action/DeleteNode.php
index c4d1aebe0b..e9de7c0acf 100644
--- a/core/modules/node/src/Plugin/Action/DeleteNode.php
+++ b/core/modules/node/src/Plugin/Action/DeleteNode.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Action\ActionBase;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Session\AccountInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -23,7 +23,7 @@ class DeleteNode extends ActionBase implements ContainerFactoryPluginInterface {
   /**
    * The tempstore object.
    *
-   * @var \Drupal\user\SharedTempStore
+   * @var \Drupal\Core\TempStore\SharedTempStore
    */
   protected $tempStore;
 
@@ -43,7 +43,7 @@ class DeleteNode extends ActionBase implements ContainerFactoryPluginInterface {
    *   The plugin ID for the plugin instance.
    * @param mixed $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    * @param \Drupal\Core\Session\AccountInterface $current_user
    *   Current user.
@@ -63,7 +63,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $configuration,
       $plugin_id,
       $plugin_definition,
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('current_user')
     );
   }
diff --git a/core/modules/quickedit/src/Form/QuickEditFieldForm.php b/core/modules/quickedit/src/Form/QuickEditFieldForm.php
index a9e0671a12..741c0de634 100644
--- a/core/modules/quickedit/src/Form/QuickEditFieldForm.php
+++ b/core/modules/quickedit/src/Form/QuickEditFieldForm.php
@@ -10,7 +10,7 @@
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Render\Element;
 use Drupal\Core\Entity\Entity\EntityFormDisplay;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\Validator\Validator\ValidatorInterface;
 
@@ -24,7 +24,7 @@ class QuickEditFieldForm extends FormBase {
   /**
    * Stores the tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -52,7 +52,7 @@ class QuickEditFieldForm extends FormBase {
   /**
    * Constructs a new EditFieldForm.
    *
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler
    *   The module handler.
@@ -73,7 +73,7 @@ public function __construct(PrivateTempStoreFactory $temp_store_factory, ModuleH
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('module_handler'),
       $container->get('entity.manager')->getStorage('node_type'),
       $container->get('typed_data_manager')->getValidator()
diff --git a/core/modules/quickedit/src/QuickEditController.php b/core/modules/quickedit/src/QuickEditController.php
index 2b1e4b230a..bc596b4227 100644
--- a/core/modules/quickedit/src/QuickEditController.php
+++ b/core/modules/quickedit/src/QuickEditController.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Controller\ControllerBase;
 use Drupal\Core\Form\FormState;
 use Drupal\Core\Render\RendererInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\JsonResponse;
 use Symfony\Component\HttpFoundation\Request;
@@ -25,7 +25,7 @@ class QuickEditController extends ControllerBase {
   /**
    * The PrivateTempStore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -53,7 +53,7 @@ class QuickEditController extends ControllerBase {
   /**
    * Constructs a new QuickEditController.
    *
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The PrivateTempStore factory.
    * @param \Drupal\quickedit\MetadataGeneratorInterface $metadata_generator
    *   The in-place editing metadata generator.
@@ -74,7 +74,7 @@ public function __construct(PrivateTempStoreFactory $temp_store_factory, Metadat
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('quickedit.metadata.generator'),
       $container->get('quickedit.editor.selector'),
       $container->get('renderer')
diff --git a/core/modules/user/src/Form/UserMultipleCancelConfirm.php b/core/modules/user/src/Form/UserMultipleCancelConfirm.php
index 985d19918d..3f8bd3831c 100644
--- a/core/modules/user/src/Form/UserMultipleCancelConfirm.php
+++ b/core/modules/user/src/Form/UserMultipleCancelConfirm.php
@@ -6,7 +6,7 @@
 use Drupal\Core\Form\ConfirmFormBase;
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Url;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Drupal\user\UserStorageInterface;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
@@ -20,7 +20,7 @@ class UserMultipleCancelConfirm extends ConfirmFormBase {
   /**
    * The temp store factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -41,7 +41,7 @@ class UserMultipleCancelConfirm extends ConfirmFormBase {
   /**
    * Constructs a new UserMultipleCancelConfirm.
    *
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The temp store factory.
    * @param \Drupal\user\UserStorageInterface $user_storage
    *   The user storage.
@@ -59,7 +59,7 @@ public function __construct(PrivateTempStoreFactory $temp_store_factory, UserSto
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('entity.manager')->getStorage('user'),
       $container->get('entity.manager')
     );
diff --git a/core/modules/user/src/Plugin/Action/CancelUser.php b/core/modules/user/src/Plugin/Action/CancelUser.php
index 60ae15686e..1ffc12284a 100644
--- a/core/modules/user/src/Plugin/Action/CancelUser.php
+++ b/core/modules/user/src/Plugin/Action/CancelUser.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Action\ActionBase;
 use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
 use Drupal\Core\Session\AccountInterface;
-use Drupal\user\PrivateTempStoreFactory;
+use Drupal\Core\TempStore\PrivateTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -23,7 +23,7 @@ class CancelUser extends ActionBase implements ContainerFactoryPluginInterface {
   /**
    * The tempstore factory.
    *
-   * @var \Drupal\user\PrivateTempStoreFactory
+   * @var \Drupal\Core\TempStore\PrivateTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -43,7 +43,7 @@ class CancelUser extends ActionBase implements ContainerFactoryPluginInterface {
    *   The plugin ID for the plugin instance.
    * @param mixed $plugin_definition
    *   The plugin implementation definition.
-   * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\PrivateTempStoreFactory $temp_store_factory
    *   The tempstore factory.
    * @param \Drupal\Core\Session\AccountInterface $current_user
    *   Current user.
@@ -63,7 +63,7 @@ public static function create(ContainerInterface $container, array $configuratio
       $configuration,
       $plugin_id,
       $plugin_definition,
-      $container->get('user.private_tempstore'),
+      $container->get('core.private_tempstore'),
       $container->get('current_user')
     );
   }
diff --git a/core/modules/user/src/PrivateTempStore.php b/core/modules/user/src/PrivateTempStore.php
index 786ff1e449..8b0bc43fb0 100644
--- a/core/modules/user/src/PrivateTempStore.php
+++ b/core/modules/user/src/PrivateTempStore.php
@@ -2,212 +2,25 @@
 
 namespace Drupal\user;
 
-use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
-use Drupal\Core\Lock\LockBackendInterface;
-use Drupal\Core\Session\AccountProxyInterface;
-use Symfony\Component\HttpFoundation\RequestStack;
+use Drupal\Core\TempStore\PrivateTempStore as CorePrivateTempStore;
+
+@trigger_error('\Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
+
+/**
+ * In order to preserve BC alias the core exception.
+ */
+if (!class_exists('\Drupal\user\TempStoreException')) {
+  class_alias('\Drupal\Core\TempStore\TempStoreException', '\Drupal\user\TempStoreException');
+}
 
 /**
  * Stores and retrieves temporary data for a given owner.
  *
- * A PrivateTempStore can be used to make temporary, non-cache data available
- * across requests. The data for the PrivateTempStore is stored in one
- * key/value collection. PrivateTempStore data expires automatically after a
- * given timeframe.
+ * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.0.
+ *   Use \Drupal\Core\TempStore\PrivateTempStore instead.
  *
- * The PrivateTempStore is different from a cache, because the data in it is not
- * yet saved permanently and so it cannot be rebuilt. Typically, the
- * PrivateTempStore might be used to store work in progress that is later saved
- * permanently elsewhere, e.g. autosave data, multistep forms, or in-progress
- * changes to complex configuration that are not ready to be saved.
- *
- * The PrivateTempStore differs from the SharedTempStore in that all keys are
- * ensured to be unique for a particular user and users can never share data. If
- * you want to be able to share data between users or use it for locking, use
- * \Drupal\user\SharedTempStore.
+ * @see \Drupal\Core\TempStore\PrivateTempStore
+ * @see https://www.drupal.org/node/2935639
  */
-class PrivateTempStore {
-
-  /**
-   * The key/value storage object used for this data.
-   *
-   * @var \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface
-   */
-  protected $storage;
-
-  /**
-   * The lock object used for this data.
-   *
-   * @var \Drupal\Core\Lock\LockBackendInterface
-   */
-  protected $lockBackend;
-
-  /**
-   * The current user.
-   *
-   * @var \Drupal\Core\Session\AccountProxyInterface
-   */
-  protected $currentUser;
-
-  /**
-   * The request stack.
-   *
-   * @var \Symfony\Component\HttpFoundation\RequestStack
-   */
-  protected $requestStack;
-
-  /**
-   * The time to live for items in seconds.
-   *
-   * By default, data is stored for one week (604800 seconds) before expiring.
-   *
-   * @var int
-   */
-  protected $expire;
-
-  /**
-   * Constructs a new object for accessing data from a key/value store.
-   *
-   * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $storage
-   *   The key/value storage object used for this data. Each storage object
-   *   represents a particular collection of data and will contain any number
-   *   of key/value pairs.
-   * @param \Drupal\Core\Lock\LockBackendInterface $lock_backend
-   *   The lock object used for this data.
-   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
-   *   The current user account.
-   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
-   *   The request stack.
-   * @param int $expire
-   *   The time to live for items, in seconds.
-   */
-  public function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lock_backend, AccountProxyInterface $current_user, RequestStack $request_stack, $expire = 604800) {
-    $this->storage = $storage;
-    $this->lockBackend = $lock_backend;
-    $this->currentUser = $current_user;
-    $this->requestStack = $request_stack;
-    $this->expire = $expire;
-  }
-
-  /**
-   * Retrieves a value from this PrivateTempStore for a given key.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
-   */
-  public function get($key) {
-    $key = $this->createkey($key);
-    if (($object = $this->storage->get($key)) && ($object->owner == $this->getOwner())) {
-      return $object->data;
-    }
-  }
-
-  /**
-   * Stores a particular key/value pair in this PrivateTempStore.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @throws \Drupal\user\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
-   */
-  public function set($key, $value) {
-    $key = $this->createkey($key);
-    if (!$this->lockBackend->acquire($key)) {
-      $this->lockBackend->wait($key);
-      if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException("Couldn't acquire lock to update item '$key' in '{$this->storage->getCollectionName()}' temporary storage.");
-      }
-    }
-
-    $value = (object) [
-      'owner' => $this->getOwner(),
-      'data' => $value,
-      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
-    ];
-    $this->storage->setWithExpire($key, $value, $this->expire);
-    $this->lockBackend->release($key);
-  }
-
-  /**
-   * Returns the metadata associated with a particular key/value pair.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   *
-   * @return mixed
-   *   An object with the owner and updated time if the key has a value, or
-   *   NULL otherwise.
-   */
-  public function getMetadata($key) {
-    $key = $this->createkey($key);
-    // Fetch the key/value pair and its metadata.
-    $object = $this->storage->get($key);
-    if ($object) {
-      // Don't keep the data itself in memory.
-      unset($object->data);
-      return $object;
-    }
-  }
-
-  /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @return bool
-   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
-   *   is not owned by $this->owner.
-   *
-   * @throws \Drupal\user\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
-   */
-  public function delete($key) {
-    $key = $this->createkey($key);
-    if (!$object = $this->storage->get($key)) {
-      return TRUE;
-    }
-    elseif ($object->owner != $this->getOwner()) {
-      return FALSE;
-    }
-    if (!$this->lockBackend->acquire($key)) {
-      $this->lockBackend->wait($key);
-      if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException("Couldn't acquire lock to delete item '$key' from '{$this->storage->getCollectionName()}' temporary storage.");
-      }
-    }
-    $this->storage->delete($key);
-    $this->lockBackend->release($key);
-    return TRUE;
-  }
-
-  /**
-   * Ensures that the key is unique for a user.
-   *
-   * @param string $key
-   *   The key.
-   *
-   * @return string
-   *   The unique key for the user.
-   */
-  protected function createkey($key) {
-    return $this->getOwner() . ':' . $key;
-  }
-
-  /**
-   * Gets the current owner based on the current user or the session ID.
-   *
-   * @return string
-   *   The owner.
-   */
-  protected function getOwner() {
-    return $this->currentUser->id() ?: $this->requestStack->getCurrentRequest()->getSession()->getId();
-  }
-
+class PrivateTempStore extends CorePrivateTempStore {
 }
diff --git a/core/modules/user/src/PrivateTempStoreFactory.php b/core/modules/user/src/PrivateTempStoreFactory.php
index e51faf342d..21d6bd1c4a 100644
--- a/core/modules/user/src/PrivateTempStoreFactory.php
+++ b/core/modules/user/src/PrivateTempStoreFactory.php
@@ -2,72 +2,20 @@
 
 namespace Drupal\user;
 
-use Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface;
-use Drupal\Core\Lock\LockBackendInterface;
-use Drupal\Core\Session\AccountProxyInterface;
-use Symfony\Component\HttpFoundation\RequestStack;
+use Drupal\Core\TempStore\PrivateTempStoreFactory as CorePrivateTempStoreFactory;
+
+@trigger_error('\Drupal\user\PrivateTempStoreFactory is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
 
 /**
  * Creates a PrivateTempStore object for a given collection.
+ *
+ * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.0.
+ *   Use \Drupal\Core\TempStore\PrivateTempStoreFactory instead.
+ *
+ * @see \Drupal\Core\TempStore\PrivateTempStoreFactory
+ * @see https://www.drupal.org/node/2935639
  */
-class PrivateTempStoreFactory {
-
-  /**
-   * The storage factory creating the backend to store the data.
-   *
-   * @var \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface
-   */
-  protected $storageFactory;
-
-  /**
-   * The lock object used for this data.
-   *
-   * @var \Drupal\Core\Lock\LockBackendInterface
-   */
-  protected $lockBackend;
-
-  /**
-   * The current user.
-   *
-   * @var \Drupal\Core\Session\AccountProxyInterface
-   */
-  protected $currentUser;
-
-  /**
-   * The request stack.
-   *
-   * @var \Symfony\Component\HttpFoundation\RequestStack
-   */
-  protected $requestStack;
-
-  /**
-   * The time to live for items in seconds.
-   *
-   * @var int
-   */
-  protected $expire;
-
-  /**
-   * Constructs a Drupal\user\PrivateTempStoreFactory object.
-   *
-   * @param \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $storage_factory
-   *   The key/value store factory.
-   * @param \Drupal\Core\Lock\LockBackendInterface $lock_backend
-   *   The lock object used for this data.
-   * @param \Drupal\Core\Session\AccountProxyInterface $current_user
-   *   The current account.
-   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
-   *   The request stack.
-   * @param int $expire
-   *   The time to live for items, in seconds.
-   */
-  public function __construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lock_backend, AccountProxyInterface $current_user, RequestStack $request_stack, $expire = 604800) {
-    $this->storageFactory = $storage_factory;
-    $this->lockBackend = $lock_backend;
-    $this->currentUser = $current_user;
-    $this->requestStack = $request_stack;
-    $this->expire = $expire;
-  }
+class PrivateTempStoreFactory extends CorePrivateTempStoreFactory {
 
   /**
    * Creates a PrivateTempStore.
diff --git a/core/modules/user/src/SharedTempStore.php b/core/modules/user/src/SharedTempStore.php
index 91a622bbef..1802110462 100644
--- a/core/modules/user/src/SharedTempStore.php
+++ b/core/modules/user/src/SharedTempStore.php
@@ -2,278 +2,25 @@
 
 namespace Drupal\user;
 
-use Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface;
-use Drupal\Core\Lock\LockBackendInterface;
-use Symfony\Component\HttpFoundation\RequestStack;
+use Drupal\Core\TempStore\SharedTempStore as CoreSharedTempStore;
+
+@trigger_error('\Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
+
+/**
+ * In order to preserve BC alias the core exception.
+ */
+if (!class_exists('\Drupal\user\TempStoreException')) {
+  class_alias('\Drupal\Core\TempStore\TempStoreException', '\Drupal\user\TempStoreException');
+}
 
 /**
  * Stores and retrieves temporary data for a given owner.
  *
- * A SharedTempStore can be used to make temporary, non-cache data available
- * across requests. The data for the SharedTempStore is stored in one key/value
- * collection. SharedTempStore data expires automatically after a given
- * timeframe.
- *
- * The SharedTempStore is different from a cache, because the data in it is not
- * yet saved permanently and so it cannot be rebuilt. Typically, the
- * SharedTempStore might be used to store work in progress that is later saved
- * permanently elsewhere, e.g. autosave data, multistep forms, or in-progress
- * changes to complex configuration that are not ready to be saved.
- *
- * Each SharedTempStore belongs to a particular owner (e.g. a user, session, or
- * process). Multiple owners may use the same key/value collection, and the
- * owner is stored along with the key/value pair.
+ * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.0.
+ *   Use \Drupal\Core\TempStore\SharedTempStore instead.
  *
- * Every key is unique within the collection, so the SharedTempStore can check
- * whether a particular key is already set by a different owner. This is
- * useful for informing one owner that the data is already in use by another;
- * for example, to let one user know that another user is in the process of
- * editing certain data, or even to restrict other users from editing it at
- * the same time. It is the responsibility of the implementation to decide
- * when and whether one owner can use or update another owner's data.
- *
- * If you want to be able to ensure that the data belongs to the current user,
- * use \Drupal\user\PrivateTempStore.
+ * @see \Drupal\Core\TempStore\SharedTempStore
+ * @see https://www.drupal.org/node/2935639
  */
-class SharedTempStore {
-
-  /**
-   * The key/value storage object used for this data.
-   *
-   * @var \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface
-   */
-  protected $storage;
-
-  /**
-   * The lock object used for this data.
-   *
-   * @var \Drupal\Core\Lock\LockBackendInterface
-   */
-  protected $lockBackend;
-
-  /**
-   * The request stack.
-   *
-   * @var \Symfony\Component\HttpFoundation\RequestStack
-   */
-  protected $requestStack;
-
-  /**
-   * The owner key to store along with the data (e.g. a user or session ID).
-   *
-   * @var mixed
-   */
-  protected $owner;
-
-  /**
-   * The time to live for items in seconds.
-   *
-   * By default, data is stored for one week (604800 seconds) before expiring.
-   *
-   * @var int
-   */
-  protected $expire;
-
-  /**
-   * Constructs a new object for accessing data from a key/value store.
-   *
-   * @param \Drupal\Core\KeyValueStore\KeyValueStoreExpirableInterface $storage
-   *   The key/value storage object used for this data. Each storage object
-   *   represents a particular collection of data and will contain any number
-   *   of key/value pairs.
-   * @param \Drupal\Core\Lock\LockBackendInterface $lock_backend
-   *   The lock object used for this data.
-   * @param mixed $owner
-   *   The owner key to store along with the data (e.g. a user or session ID).
-   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
-   *   The request stack.
-   * @param int $expire
-   *   The time to live for items, in seconds.
-   */
-  public function __construct(KeyValueStoreExpirableInterface $storage, LockBackendInterface $lock_backend, $owner, RequestStack $request_stack, $expire = 604800) {
-    $this->storage = $storage;
-    $this->lockBackend = $lock_backend;
-    $this->owner = $owner;
-    $this->requestStack = $request_stack;
-    $this->expire = $expire;
-  }
-
-  /**
-   * Retrieves a value from this SharedTempStore for a given key.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
-   */
-  public function get($key) {
-    if ($object = $this->storage->get($key)) {
-      return $object->data;
-    }
-  }
-
-  /**
-   * Retrieves a value from this SharedTempStore for a given key.
-   *
-   * Only returns the value if the value is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to retrieve.
-   *
-   * @return mixed
-   *   The data associated with the key, or NULL if the key does not exist.
-   */
-  public function getIfOwner($key) {
-    if (($object = $this->storage->get($key)) && ($object->owner == $this->owner)) {
-      return $object->data;
-    }
-  }
-
-  /**
-   * Stores a particular key/value pair only if the key doesn't already exist.
-   *
-   * @param string $key
-   *   The key of the data to check and store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @return bool
-   *   TRUE if the data was set, or FALSE if it already existed.
-   */
-  public function setIfNotExists($key, $value) {
-    $value = (object) [
-      'owner' => $this->owner,
-      'data' => $value,
-      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
-    ];
-    return $this->storage->setWithExpireIfNotExists($key, $value, $this->expire);
-  }
-
-  /**
-   * Stores a particular key/value pair in this SharedTempStore.
-   *
-   * Only stores the given key/value pair if it does not exist yet or is owned
-   * by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @return bool
-   *   TRUE if the data was set, or FALSE if it already exists and is not owned
-   *   by $this->user.
-   *
-   * @throws \Drupal\user\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
-   */
-  public function setIfOwner($key, $value) {
-    if ($this->setIfNotExists($key, $value)) {
-      return TRUE;
-    }
-
-    if (($object = $this->storage->get($key)) && ($object->owner == $this->owner)) {
-      $this->set($key, $value);
-      return TRUE;
-    }
-
-    return FALSE;
-  }
-
-  /**
-   * Stores a particular key/value pair in this SharedTempStore.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   * @param mixed $value
-   *   The data to store.
-   *
-   * @throws \Drupal\user\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
-   */
-  public function set($key, $value) {
-    if (!$this->lockBackend->acquire($key)) {
-      $this->lockBackend->wait($key);
-      if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException("Couldn't acquire lock to update item '$key' in '{$this->storage->getCollectionName()}' temporary storage.");
-      }
-    }
-
-    $value = (object) [
-      'owner' => $this->owner,
-      'data' => $value,
-      'updated' => (int) $this->requestStack->getMasterRequest()->server->get('REQUEST_TIME'),
-    ];
-    $this->storage->setWithExpire($key, $value, $this->expire);
-    $this->lockBackend->release($key);
-  }
-
-  /**
-   * Returns the metadata associated with a particular key/value pair.
-   *
-   * @param string $key
-   *   The key of the data to store.
-   *
-   * @return mixed
-   *   An object with the owner and updated time if the key has a value, or
-   *   NULL otherwise.
-   */
-  public function getMetadata($key) {
-    // Fetch the key/value pair and its metadata.
-    $object = $this->storage->get($key);
-    if ($object) {
-      // Don't keep the data itself in memory.
-      unset($object->data);
-      return $object;
-    }
-  }
-
-  /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @throws \Drupal\user\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
-   */
-  public function delete($key) {
-    if (!$this->lockBackend->acquire($key)) {
-      $this->lockBackend->wait($key);
-      if (!$this->lockBackend->acquire($key)) {
-        throw new TempStoreException("Couldn't acquire lock to delete item '$key' from {$this->storage->getCollectionName()} temporary storage.");
-      }
-    }
-    $this->storage->delete($key);
-    $this->lockBackend->release($key);
-  }
-
-  /**
-   * Deletes data from the store for a given key and releases the lock on it.
-   *
-   * Only delete the given key if it is owned by $this->owner.
-   *
-   * @param string $key
-   *   The key of the data to delete.
-   *
-   * @return bool
-   *   TRUE if the object was deleted or does not exist, FALSE if it exists but
-   *   is not owned by $this->owner.
-   *
-   * @throws \Drupal\user\TempStoreException
-   *   Thrown when a lock for the backend storage could not be acquired.
-   */
-  public function deleteIfOwner($key) {
-    if (!$object = $this->storage->get($key)) {
-      return TRUE;
-    }
-    elseif ($object->owner == $this->owner) {
-      $this->delete($key);
-      return TRUE;
-    }
-
-    return FALSE;
-  }
-
+class SharedTempStore extends CoreSharedTempStore {
 }
diff --git a/core/modules/user/src/SharedTempStoreFactory.php b/core/modules/user/src/SharedTempStoreFactory.php
index 29f8683201..c955f07f7a 100644
--- a/core/modules/user/src/SharedTempStoreFactory.php
+++ b/core/modules/user/src/SharedTempStoreFactory.php
@@ -2,61 +2,20 @@
 
 namespace Drupal\user;
 
-use Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface;
-use Drupal\Core\Lock\LockBackendInterface;
-use Symfony\Component\HttpFoundation\RequestStack;
+use Drupal\Core\TempStore\SharedTempStoreFactory as CoreSharedTempStoreFactory;
+
+@trigger_error('\Drupal\user\SharedTempStoreFactory is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStoreFactory instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
 
 /**
  * Creates a shared temporary storage for a collection.
+ *
+ * @deprecated in Drupal 8.5.x, to be removed before Drupal 9.0.0.
+ *   Use \Drupal\Core\TempStore\SharedTempStoreFactory instead.
+ *
+ * @see \Drupal\Core\TempStore\SharedTempStoreFactory
+ * @see https://www.drupal.org/node/2935639
  */
-class SharedTempStoreFactory {
-
-  /**
-   * The storage factory creating the backend to store the data.
-   *
-   * @var \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface
-   */
-  protected $storageFactory;
-
-  /**
-   * The lock object used for this data.
-   *
-   * @var \Drupal\Core\Lock\LockBackendInterface
-   */
-  protected $lockBackend;
-
-  /**
-   * The request stack.
-   *
-   * @var \Symfony\Component\HttpFoundation\RequestStack
-   */
-  protected $requestStack;
-
-  /**
-   * The time to live for items in seconds.
-   *
-   * @var int
-   */
-  protected $expire;
-
-  /**
-   * Constructs a Drupal\user\SharedTempStoreFactory object.
-   *
-   * @param \Drupal\Core\KeyValueStore\KeyValueExpirableFactoryInterface $storage_factory
-   *   The key/value store factory.
-   * @param \Drupal\Core\Lock\LockBackendInterface $lock_backend
-   *   The lock object used for this data.
-   * @param \Symfony\Component\HttpFoundation\RequestStack $request_stack
-   *   The request stack.
-   * @param int $expire
-   *   The time to live for items, in seconds.
-   */
-  public function __construct(KeyValueExpirableFactoryInterface $storage_factory, LockBackendInterface $lock_backend, RequestStack $request_stack, $expire = 604800) {
-    $this->storageFactory = $storage_factory;
-    $this->lockBackend = $lock_backend;
-    $this->requestStack = $request_stack;
-    $this->expire = $expire;
-  }
+class SharedTempStoreFactory extends CoreSharedTempStoreFactory {
 
   /**
    * Creates a SharedTempStore for the current user or anonymous session.
diff --git a/core/modules/user/src/UserServiceProvider.php b/core/modules/user/src/UserServiceProvider.php
index 49537e56a6..735c5c881f 100644
--- a/core/modules/user/src/UserServiceProvider.php
+++ b/core/modules/user/src/UserServiceProvider.php
@@ -1,8 +1,20 @@
 <?php
-// @codingStandardsIgnoreFile
-// This class is intentionally empty so that it overwrites when sites are
-// updated from a zip/tarball without deleting the /core folder first.
-// @todo: remove in 8.3.x
-//
+
 namespace Drupal\user;
-class UserServiceProvider {}
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\Core\DependencyInjection\ServiceModifierInterface;
+
+class UserServiceProvider implements ServiceModifierInterface {
+
+  /**
+   * {@inheritdoc}
+   */
+  public function alter(ContainerBuilder $container) {
+    if ($container->hasParameter('user.tempstore.expire')) {
+      @trigger_error('The container parameter "user.tempstore.expire" is deprecated. Use "core.tempstore.expire" instead. See https://www.drupal.org/node/2935639.', E_USER_DEPRECATED);
+      $container->setParameter('core.tempstore.expire', $container->getParameter('user.tempstore.expire'));
+    }
+  }
+
+}
diff --git a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
index b3d7ff1e1a..ae9d4cb13e 100644
--- a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
+++ b/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
@@ -12,7 +12,8 @@
  * Tests the temporary object storage system.
  *
  * @group user
- * @see \Drupal\Core\TempStore\TempStore.
+ * @group legacy
+ * @see \Drupal\user\SharedTempStore
  */
 class TempStoreDatabaseTest extends KernelTestBase {
 
@@ -67,6 +68,9 @@ protected function setUp() {
 
   /**
    * Tests the UserTempStore API.
+   *
+   * @expectedDeprecation \Drupal\user\SharedTempStoreFactory is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStoreFactory instead. See https://www.drupal.org/node/2935639.
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testUserTempStore() {
     // Create a key/value collection.
diff --git a/core/modules/user/tests/src/Kernel/UserServiceProviderTest.php b/core/modules/user/tests/src/Kernel/UserServiceProviderTest.php
new file mode 100644
index 0000000000..0c77d9a47d
--- /dev/null
+++ b/core/modules/user/tests/src/Kernel/UserServiceProviderTest.php
@@ -0,0 +1,40 @@
+<?php
+
+namespace Drupal\Tests\user\Kernel;
+
+use Drupal\Core\DependencyInjection\ContainerBuilder;
+use Drupal\KernelTests\KernelTestBase;
+
+/**
+ * Tests \Drupal\user\UserServiceProvider.
+ *
+ * @group user
+ * @group legacy
+ */
+class UserServiceProviderTest extends KernelTestBase {
+
+  /**
+   * Modules to enable.
+   *
+   * @var array
+   */
+  public static $modules = ['user'];
+
+  /**
+   * Tests that core.tempstore.expire is set to user.tempstore.expire.
+   *
+   * @expectedDeprecation The container parameter "user.tempstore.expire" is deprecated. Use "core.tempstore.expire" instead. See https://www.drupal.org/node/2935639.
+   */
+  public function testUserServiceProvider() {
+    $this->assertEquals(1000, $this->container->getParameter('core.tempstore.expire'));
+  }
+
+  /**
+   * {@inheritdoc}
+   */
+  public function register(ContainerBuilder $container) {
+    $container->setParameter('user.tempstore.expire', 1000);
+    parent::register($container);
+  }
+
+}
diff --git a/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php b/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
index 8d188114cc..be9376ad1d 100644
--- a/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
+++ b/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
@@ -11,6 +11,9 @@
 /**
  * @coversDefaultClass \Drupal\user\PrivateTempStore
  * @group user
+ * @group legacy
+ * @runTestsInSeparateProcesses
+ * @preserveGlobalState disabled
  */
 class PrivateTempStoreTest extends UnitTestCase {
 
@@ -98,6 +101,7 @@ protected function setUp() {
    * Tests the get() method.
    *
    * @covers ::get
+   * @expectedDeprecation \Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testGet() {
     $this->keyValue->expects($this->at(0))
@@ -122,6 +126,7 @@ public function testGet() {
    * Tests the set() method with no lock available.
    *
    * @covers ::set
+   * @expectedDeprecation \Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSetWithNoLockAvailable() {
     $this->lock->expects($this->at(0))
@@ -147,6 +152,7 @@ public function testSetWithNoLockAvailable() {
    * Tests a successful set() call.
    *
    * @covers ::set
+   * @expectedDeprecation \Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSet() {
     $this->lock->expects($this->once())
@@ -170,6 +176,7 @@ public function testSet() {
    * Tests the getMetadata() method.
    *
    * @covers ::getMetadata
+   * @expectedDeprecation \Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testGetMetadata() {
     $this->keyValue->expects($this->at(0))
@@ -194,6 +201,7 @@ public function testGetMetadata() {
    * Tests the locking in the delete() method.
    *
    * @covers ::delete
+   * @expectedDeprecation \Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testDeleteLocking() {
     $this->keyValue->expects($this->once())
@@ -221,6 +229,7 @@ public function testDeleteLocking() {
    * Tests the delete() method with no lock available.
    *
    * @covers ::delete
+   * @expectedDeprecation \Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testDeleteWithNoLockAvailable() {
     $this->keyValue->expects($this->once())
@@ -250,6 +259,7 @@ public function testDeleteWithNoLockAvailable() {
    * Tests the delete() method.
    *
    * @covers ::delete
+   * @expectedDeprecation \Drupal\user\PrivateTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\PrivateTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testDelete() {
     $this->lock->expects($this->once())
diff --git a/core/modules/user/tests/src/Unit/SharedTempStoreTest.php b/core/modules/user/tests/src/Unit/SharedTempStoreTest.php
index 33bde413e2..6b5d441968 100644
--- a/core/modules/user/tests/src/Unit/SharedTempStoreTest.php
+++ b/core/modules/user/tests/src/Unit/SharedTempStoreTest.php
@@ -11,6 +11,9 @@
 /**
  * @coversDefaultClass \Drupal\user\SharedTempStore
  * @group user
+ * @group legacy
+ * @runTestsInSeparateProcesses
+ * @preserveGlobalState disabled
  */
 class SharedTempStoreTest extends UnitTestCase {
 
@@ -90,6 +93,7 @@ protected function setUp() {
 
   /**
    * @covers ::get
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testGet() {
     $this->keyValue->expects($this->at(0))
@@ -109,6 +113,7 @@ public function testGet() {
    * Tests the getIfOwner() method.
    *
    * @covers ::getIfOwner
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testGetIfOwner() {
     $this->keyValue->expects($this->at(0))
@@ -133,6 +138,7 @@ public function testGetIfOwner() {
    * Tests the set() method with no lock available.
    *
    * @covers ::set
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSetWithNoLockAvailable() {
     $this->lock->expects($this->at(0))
@@ -158,6 +164,7 @@ public function testSetWithNoLockAvailable() {
    * Tests a successful set() call.
    *
    * @covers ::set
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSet() {
     $this->lock->expects($this->once())
@@ -181,6 +188,7 @@ public function testSet() {
    * Tests the setIfNotExists() methods.
    *
    * @covers ::setIfNotExists
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSetIfNotExists() {
     $this->keyValue->expects($this->once())
@@ -195,6 +203,7 @@ public function testSetIfNotExists() {
    * Tests the setIfOwner() method when no key exists.
    *
    * @covers ::setIfOwner
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSetIfOwnerWhenNotExists() {
     $this->keyValue->expects($this->once())
@@ -208,6 +217,7 @@ public function testSetIfOwnerWhenNotExists() {
    * Tests the setIfOwner() method when a key already exists but no object.
    *
    * @covers ::setIfOwner
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSetIfOwnerNoObject() {
     $this->keyValue->expects($this->once())
@@ -226,6 +236,7 @@ public function testSetIfOwnerNoObject() {
    * Tests the setIfOwner() method with matching and non matching owners.
    *
    * @covers ::setIfOwner
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testSetIfOwner() {
     $this->lock->expects($this->once())
@@ -250,6 +261,7 @@ public function testSetIfOwner() {
    * Tests the getMetadata() method.
    *
    * @covers ::getMetadata
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testGetMetadata() {
     $this->keyValue->expects($this->at(0))
@@ -274,6 +286,7 @@ public function testGetMetadata() {
    * Tests the delete() method.
    *
    * @covers ::delete
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testDelete() {
     $this->lock->expects($this->once())
@@ -297,6 +310,7 @@ public function testDelete() {
    * Tests the delete() method with no lock available.
    *
    * @covers ::delete
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testDeleteWithNoLockAvailable() {
     $this->lock->expects($this->at(0))
@@ -322,6 +336,7 @@ public function testDeleteWithNoLockAvailable() {
    * Tests the deleteIfOwner() method.
    *
    * @covers ::deleteIfOwner
+   * @expectedDeprecation \Drupal\user\SharedTempStore is scheduled for removal in Drupal 9.0.0. Use \Drupal\Core\TempStore\SharedTempStore instead. See https://www.drupal.org/node/2935639.
    */
   public function testDeleteIfOwner() {
     $this->lock->expects($this->once())
diff --git a/core/modules/user/user.services.yml b/core/modules/user/user.services.yml
index c273cb3443..f0c7354e2a 100644
--- a/core/modules/user/user.services.yml
+++ b/core/modules/user/user.services.yml
@@ -50,12 +50,14 @@ services:
     arguments: ['@entity.manager', '@password']
   user.private_tempstore:
     class: Drupal\user\PrivateTempStoreFactory
-    arguments: ['@keyvalue.expirable', '@lock', '@current_user', '@request_stack', '%user.tempstore.expire%']
+    arguments: ['@keyvalue.expirable', '@lock', '@current_user', '@request_stack', '%core.tempstore.expire%']
+    deprecated: The "%service_id%" service is deprecated. You should use the 'core.private_tempstore' service instead. See https://www.drupal.org/node/2935639.
     tags:
       - { name: backend_overridable }
   user.shared_tempstore:
     class: Drupal\user\SharedTempStoreFactory
-    arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%user.tempstore.expire%']
+    arguments: ['@keyvalue.expirable', '@lock', '@request_stack', '%core.tempstore.expire%']
+    deprecated: The "%service_id%" service is deprecated. You should use the 'core.shared_tempstore' service instead. See https://www.drupal.org/node/2935639.
     tags:
       - { name: backend_overridable }
   user.permissions:
@@ -66,6 +68,3 @@ services:
     arguments: ['@current_user', '@entity.manager']
     tags:
       - { name: 'context_provider' }
-
-parameters:
-  user.tempstore.expire: 604800
diff --git a/core/modules/views/src/Entity/View.php b/core/modules/views/src/Entity/View.php
index b69234c3bc..370e812091 100644
--- a/core/modules/views/src/Entity/View.php
+++ b/core/modules/views/src/Entity/View.php
@@ -456,7 +456,7 @@ public static function preDelete(EntityStorageInterface $storage, array $entitie
   public static function postDelete(EntityStorageInterface $storage, array $entities) {
     parent::postDelete($storage, $entities);
 
-    $tempstore = \Drupal::service('user.shared_tempstore')->get('views');
+    $tempstore = \Drupal::service('core.shared_tempstore')->get('views');
     foreach ($entities as $entity) {
       $tempstore->delete($entity->id());
     }
diff --git a/core/modules/views_ui/src/Form/BreakLockForm.php b/core/modules/views_ui/src/Form/BreakLockForm.php
index 464920b7b5..b391a91132 100644
--- a/core/modules/views_ui/src/Form/BreakLockForm.php
+++ b/core/modules/views_ui/src/Form/BreakLockForm.php
@@ -5,7 +5,7 @@
 use Drupal\Core\Entity\EntityConfirmFormBase;
 use Drupal\Core\Entity\EntityManagerInterface;
 use Drupal\Core\Form\FormStateInterface;
-use Drupal\user\SharedTempStoreFactory;
+use Drupal\Core\TempStore\SharedTempStoreFactory;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 
 /**
@@ -23,9 +23,9 @@ class BreakLockForm extends EntityConfirmFormBase {
   protected $entityManager;
 
   /**
-   * Stores the user tempstore.
+   * Stores the shared tempstore.
    *
-   * @var \Drupal\user\SharedTempStore
+   * @var \Drupal\Core\TempStore\SharedTempStore
    */
   protected $tempStore;
 
@@ -34,7 +34,7 @@ class BreakLockForm extends EntityConfirmFormBase {
    *
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The Entity manager.
-   * @param \Drupal\user\SharedTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\SharedTempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    */
   public function __construct(EntityManagerInterface $entity_manager, SharedTempStoreFactory $temp_store_factory) {
@@ -48,7 +48,7 @@ public function __construct(EntityManagerInterface $entity_manager, SharedTempSt
   public static function create(ContainerInterface $container) {
     return new static(
       $container->get('entity.manager'),
-      $container->get('user.shared_tempstore')
+      $container->get('core.shared_tempstore')
     );
   }
 
diff --git a/core/modules/views_ui/src/ParamConverter/ViewUIConverter.php b/core/modules/views_ui/src/ParamConverter/ViewUIConverter.php
index ad718ba5b1..fb19d18a39 100644
--- a/core/modules/views_ui/src/ParamConverter/ViewUIConverter.php
+++ b/core/modules/views_ui/src/ParamConverter/ViewUIConverter.php
@@ -8,7 +8,7 @@
 use Drupal\Core\Routing\AdminContext;
 use Symfony\Component\Routing\Route;
 use Drupal\Core\ParamConverter\ParamConverterInterface;
-use Drupal\user\SharedTempStoreFactory;
+use Drupal\Core\TempStore\SharedTempStoreFactory;
 use Drupal\views_ui\ViewUI;
 
 /**
@@ -32,7 +32,7 @@ class ViewUIConverter extends AdminPathConfigEntityConverter implements ParamCon
   /**
    * Stores the tempstore factory.
    *
-   * @var \Drupal\user\SharedTempStoreFactory
+   * @var \Drupal\Core\TempStore\SharedTempStoreFactory
    */
   protected $tempStoreFactory;
 
@@ -41,7 +41,7 @@ class ViewUIConverter extends AdminPathConfigEntityConverter implements ParamCon
    *
    * @param \Drupal\Core\Entity\EntityManagerInterface $entity_manager
    *   The entity manager.
-   * @param \Drupal\user\SharedTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\SharedTempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    */
   public function __construct(EntityManagerInterface $entity_manager, SharedTempStoreFactory $temp_store_factory, ConfigFactoryInterface $config_factory = NULL, AdminContext $admin_context = NULL) {
diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php
index 9c1d58a529..8eee5d5192 100644
--- a/core/modules/views_ui/src/ViewEditForm.php
+++ b/core/modules/views_ui/src/ViewEditForm.php
@@ -11,7 +11,7 @@
 use Drupal\Core\Form\FormStateInterface;
 use Drupal\Core\Render\ElementInfoManagerInterface;
 use Drupal\Core\Url;
-use Drupal\user\SharedTempStoreFactory;
+use Drupal\Core\TempStore\SharedTempStoreFactory;
 use Drupal\views\Views;
 use Symfony\Component\DependencyInjection\ContainerInterface;
 use Symfony\Component\HttpFoundation\RequestStack;
@@ -27,7 +27,7 @@ class ViewEditForm extends ViewFormBase {
   /**
    * The views temp store.
    *
-   * @var \Drupal\user\SharedTempStore
+   * @var \Drupal\Core\TempStore\SharedTempStore
    */
   protected $tempStore;
 
@@ -55,7 +55,7 @@ class ViewEditForm extends ViewFormBase {
   /**
    * Constructs a new ViewEditForm object.
    *
-   * @param \Drupal\user\SharedTempStoreFactory $temp_store_factory
+   * @param \Drupal\Core\TempStore\SharedTempStoreFactory $temp_store_factory
    *   The factory for the temp store object.
    * @param \Symfony\Component\HttpFoundation\RequestStack $requestStack
    *   The request stack object.
@@ -76,7 +76,7 @@ public function __construct(SharedTempStoreFactory $temp_store_factory, RequestS
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('user.shared_tempstore'),
+      $container->get('core.shared_tempstore'),
       $container->get('request_stack'),
       $container->get('date.formatter'),
       $container->get('element_info')
diff --git a/core/modules/views_ui/src/ViewUI.php b/core/modules/views_ui/src/ViewUI.php
index 2e7fabd62b..a0798aa48d 100644
--- a/core/modules/views_ui/src/ViewUI.php
+++ b/core/modules/views_ui/src/ViewUI.php
@@ -48,7 +48,7 @@ class ViewUI implements ViewEntityInterface {
    * If this view is locked for editing.
    *
    * If this view is locked it will contain the result of
-   * \Drupal\user\SharedTempStore::getMetadata(). Which can be a stdClass or
+   * \Drupal\Core\TempStore\SharedTempStore::getMetadata(). Which can be a stdClass or
    * NULL.
    *
    * @var stdClass
@@ -855,7 +855,7 @@ public function getFormProgress() {
   }
 
   /**
-   * Sets a cached view object in the user tempstore.
+   * Sets a cached view object in the shared tempstore.
    */
   public function cacheSet() {
     if ($this->isLocked()) {
@@ -878,7 +878,7 @@ public function cacheSet() {
     $executable->default_display = NULL;
     $executable->query = NULL;
     $executable->displayHandlers = NULL;
-    \Drupal::service('user.shared_tempstore')->get('views')->set($this->id(), $this);
+    \Drupal::service('core.shared_tempstore')->get('views')->set($this->id(), $this);
   }
 
   /**
diff --git a/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php b/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
index 51e489d93e..82c6618e5b 100644
--- a/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
+++ b/core/modules/views_ui/tests/src/Functional/CachedDataUITest.php
@@ -3,7 +3,7 @@
 namespace Drupal\Tests\views_ui\Functional;
 
 /**
- * Tests the user tempstore cache in the UI.
+ * Tests the shared tempstore cache in the UI.
  *
  * @group views_ui
  */
@@ -17,12 +17,12 @@ class CachedDataUITest extends UITestBase {
   public static $testViews = ['test_view'];
 
   /**
-   * Tests the user tempstore views data in the UI.
+   * Tests the shared tempstore views data in the UI.
    */
   public function testCacheData() {
     $views_admin_user_uid = $this->fullAdminUser->id();
 
-    $temp_store = $this->container->get('user.shared_tempstore')->get('views');
+    $temp_store = $this->container->get('core.shared_tempstore')->get('views');
     // The view should not be locked.
     $this->assertEqual($temp_store->getMetadata('test_view'), NULL, 'The view is not locked.');
 
@@ -40,7 +40,7 @@ public function testCacheData() {
 
     // Cancel the view edit and make sure the cache is deleted.
     $this->drupalPostForm(NULL, [], t('Cancel'));
-    $this->assertEqual($temp_store->getMetadata('test_view'), NULL, 'User tempstore data has been removed.');
+    $this->assertEqual($temp_store->getMetadata('test_view'), NULL, 'Shared tempstore data has been removed.');
     // Test we are redirected to the view listing page.
     $this->assertUrl('admin/structure/views', [], 'Redirected back to the view listing page.');
 
diff --git a/core/modules/views_ui/views_ui.services.yml b/core/modules/views_ui/views_ui.services.yml
index 27fa334c51..f86b7dcf2f 100644
--- a/core/modules/views_ui/views_ui.services.yml
+++ b/core/modules/views_ui/views_ui.services.yml
@@ -1,7 +1,7 @@
 services:
   paramconverter.views_ui:
     class: Drupal\views_ui\ParamConverter\ViewUIConverter
-    arguments: ['@entity.manager', '@user.shared_tempstore', '@config.factory', '@router.admin_context']
+    arguments: ['@entity.manager', '@core.shared_tempstore', '@config.factory', '@router.admin_context']
     tags:
       - { name: paramconverter, priority: 10 }
     lazy: true
diff --git a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
similarity index 90%
copy from core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
copy to core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
index b3d7ff1e1a..a2f8a9456e 100644
--- a/core/modules/user/tests/src/Kernel/TempStoreDatabaseTest.php
+++ b/core/tests/Drupal/KernelTests/Core/TempStore/TempStoreDatabaseTest.php
@@ -1,18 +1,18 @@
 <?php
 
-namespace Drupal\Tests\user\Kernel;
+namespace Drupal\KernelTests\Core\TempStore;
 
 use Drupal\Core\KeyValueStore\KeyValueExpirableFactory;
 use Drupal\KernelTests\KernelTestBase;
-use Drupal\user\SharedTempStoreFactory;
+use Drupal\Core\TempStore\SharedTempStoreFactory;
 use Drupal\Core\Lock\DatabaseLockBackend;
 use Drupal\Core\Database\Database;
 
 /**
  * Tests the temporary object storage system.
  *
- * @group user
- * @see \Drupal\Core\TempStore\TempStore.
+ * @group TempStore
+ * @see \Drupal\Core\TempStore\SharedTempStore
  */
 class TempStoreDatabaseTest extends KernelTestBase {
 
@@ -21,12 +21,12 @@ class TempStoreDatabaseTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = ['system', 'user'];
+  public static $modules = ['system'];
 
   /**
    * A key/value store factory.
    *
-   * @var \Drupal\user\SharedTempStoreFactory
+   * @var \Drupal\Core\TempStore\SharedTempStoreFactory
    */
   protected $storeFactory;
 
@@ -37,13 +37,6 @@ class TempStoreDatabaseTest extends KernelTestBase {
    */
   protected $collection;
 
-  /**
-   * An array of (fake) user IDs.
-   *
-   * @var array
-   */
-  protected $users = [];
-
   /**
    * An array of random stdClass objects.
    *
@@ -66,9 +59,9 @@ protected function setUp() {
   }
 
   /**
-   * Tests the UserTempStore API.
+   * Tests the SharedTempStore API.
    */
-  public function testUserTempStore() {
+  public function testSharedTempStore() {
     // Create a key/value collection.
     $factory = new SharedTempStoreFactory(new KeyValueExpirableFactory(\Drupal::getContainer()), new DatabaseLockBackend(Database::getConnection()), $this->container->get('request_stack'));
     $collection = $this->randomMachineName();
@@ -136,7 +129,7 @@ public function testUserTempStore() {
     // assert it is no longer accessible.
     db_update('key_value_expire')
       ->fields(['expire' => REQUEST_TIME - 1])
-      ->condition('collection', "user.shared_tempstore.$collection")
+      ->condition('collection', "core.shared_tempstore.$collection")
       ->condition('name', $key)
       ->execute();
     $this->assertFalse($stores[0]->get($key));
diff --git a/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
similarity index 96%
copy from core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
copy to core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
index 8d188114cc..0144919b24 100644
--- a/core/modules/user/tests/src/Unit/PrivateTempStoreTest.php
+++ b/core/tests/Drupal/Tests/Core/TempStore/PrivateTempStoreTest.php
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\Tests\user\Unit;
+namespace Drupal\Tests\Core\TempStore;
 
 use Drupal\Tests\UnitTestCase;
-use Drupal\user\PrivateTempStore;
-use Drupal\user\TempStoreException;
+use Drupal\Core\TempStore\PrivateTempStore;
+use Drupal\Core\TempStore\TempStoreException;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
- * @coversDefaultClass \Drupal\user\PrivateTempStore
- * @group user
+ * @coversDefaultClass \Drupal\Core\TempStore\PrivateTempStore
+ * @group TempStore
  */
 class PrivateTempStoreTest extends UnitTestCase {
 
@@ -29,9 +29,9 @@ class PrivateTempStoreTest extends UnitTestCase {
   protected $lock;
 
   /**
-   * The user temp store.
+   * The temp store.
    *
-   * @var \Drupal\user\PrivateTempStore
+   * @var \Drupal\Core\TempStore\PrivateTempStore
    */
   protected $tempStore;
 
diff --git a/core/modules/user/tests/src/Unit/SharedTempStoreTest.php b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
similarity index 97%
copy from core/modules/user/tests/src/Unit/SharedTempStoreTest.php
copy to core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
index 33bde413e2..55a78b9a25 100644
--- a/core/modules/user/tests/src/Unit/SharedTempStoreTest.php
+++ b/core/tests/Drupal/Tests/Core/TempStore/SharedTempStoreTest.php
@@ -1,16 +1,16 @@
 <?php
 
-namespace Drupal\Tests\user\Unit;
+namespace Drupal\Tests\Core\TempStore;
 
 use Drupal\Tests\UnitTestCase;
-use Drupal\user\SharedTempStore;
-use Drupal\user\TempStoreException;
+use Drupal\Core\TempStore\SharedTempStore;
+use Drupal\Core\TempStore\TempStoreException;
 use Symfony\Component\HttpFoundation\Request;
 use Symfony\Component\HttpFoundation\RequestStack;
 
 /**
- * @coversDefaultClass \Drupal\user\SharedTempStore
- * @group user
+ * @coversDefaultClass \Drupal\Core\TempStore\SharedTempStore
+ * @group TempStore
  */
 class SharedTempStoreTest extends UnitTestCase {
 
@@ -29,9 +29,9 @@ class SharedTempStoreTest extends UnitTestCase {
   protected $lock;
 
   /**
-   * The user temp store.
+   * The temp store.
    *
-   * @var \Drupal\user\SharedTempStore
+   * @var \Drupal\Core\TempStore\SharedTempStore
    */
   protected $tempStore;
 
