diff --git a/core/modules/system/src/Tests/System/SystemAuthorizeTest.php b/core/modules/system/src/Tests/System/SystemAuthorizeTest.php
index 2fd4d6e..cbc359a 100644
--- a/core/modules/system/src/Tests/System/SystemAuthorizeTest.php
+++ b/core/modules/system/src/Tests/System/SystemAuthorizeTest.php
@@ -59,5 +59,8 @@ function testFileTransferHooks() {
     $this->assertRaw('System Test FileTransfer');
     // Make sure the settings form callback works.
     $this->assertText('System Test Username');
+    // Test that \Drupal\Core\Render\BareHtmlPageRenderer adds assets as
+    // expected to the first page of the authorize.php script.
+    $this->assertRaw('core/misc/states.js');
   }
 }
diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 9334a88..131077d 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -526,6 +526,7 @@ function system_filetransfer_info() {
  */
 function system_page_attachments(array &$page) {
   // Ensure the same CSS is loaded in template_preprocess_maintenance_page().
+  $page['#attached']['library'][] = 'core/drupal.states';
   $page['#attached']['library'][] = 'core/normalize';
   $page['#attached']['library'][] = 'system/base';
   if (\Drupal::service('router.admin_context')->isAdminRoute()) {
