diff --git a/core/modules/rest/rest.install b/core/modules/rest/rest.install
index e7b5394..c6946b5 100644
--- a/core/modules/rest/rest.install
+++ b/core/modules/rest/rest.install
@@ -92,5 +92,41 @@ function rest_update_8203() {
 }
 
 /**
+ * Ensure the right REST authentication method is used.
+ *
+ * This fixes the bug in https://www.drupal.org/node/2825204.
+ */
+function rest_update_8204() {
+  $config_factory = \Drupal::configFactory();
+  $process_auth = function ($auth_option) {
+    $providers = \Drupal::service('authentication_collector')->getSortedProviders();
+    foreach ($providers as $provider_id => $provider_data) {
+      // The provider belongs to the module that declares it as a service.
+      if ($auth_option == strtok($provider_data->_serviceId, '.')) {
+        return $provider_id;
+      }
+    }
+
+    return $auth_option;
+  };
+
+  foreach ($config_factory->listAll('views.view.') as $view_config_name) {
+    $save = FALSE;
+    $view = $config_factory->getEditable($view_config_name);
+    $displays = $view->get('display');
+    foreach ($displays as $display_name => $display) {
+      if ('rest_export' === $display['display_plugin'] && !empty($display['display_options']['auth'])) {
+        $displays[$display_name]['display_options']['auth'] = array_map($process_auth, $display['display_options']['auth']);
+        $save = TRUE;
+      }
+    }
+    if ($save) {
+      $view->set('display', $displays);
+      $view->save(TRUE);
+    }
+  }
+}
+
+/**
  * @} End of "defgroup updates-8.1.x-to-8.2.x".
  */
diff --git a/core/modules/rest/src/Plugin/views/display/RestExport.php b/core/modules/rest/src/Plugin/views/display/RestExport.php
index 65bce23..04d5c10 100644
--- a/core/modules/rest/src/Plugin/views/display/RestExport.php
+++ b/core/modules/rest/src/Plugin/views/display/RestExport.php
@@ -227,7 +227,11 @@ public function getContentType() {
    *   An array to use as value for "#options" in the form element.
    */
   public function getAuthOptions() {
-    return array_combine($this->authenticationProviders, $this->authenticationProviders);
+    // Values of "$this->authenticationProviders" - are module names, defining
+    // authentication providers. Only provider IDs should be used for choosing.
+    $providers = array_keys($this->authenticationProviders);
+
+    return array_combine($providers, $providers);
   }
 
   /**
@@ -457,10 +461,12 @@ public function calculateDependencies() {
     $dependencies = parent::calculateDependencies();
 
     $dependencies += ['module' => []];
-    $modules = array_map(function ($authentication_provider) {
-      return $this->authenticationProviders[$authentication_provider];
-    }, $this->getOption('auth'));
-    $dependencies['module'] = array_merge($dependencies['module'], $modules);
+    $dependencies['module'] = array_merge($dependencies['module'], array_filter(array_map(function ($provider) {
+      // During the update path the provider options might be wrong.
+      return isset($this->authenticationProviders[$provider])
+        ? $this->authenticationProviders[$provider]
+        : NULL;
+    }, $this->getOption('auth'))));
 
     return $dependencies;
   }
diff --git a/core/modules/rest/src/Tests/Update/RestExportAuthUpdateTest.php b/core/modules/rest/src/Tests/Update/RestExportAuthCorrectionUpdateTest.php
similarity index 72%
rename from core/modules/rest/src/Tests/Update/RestExportAuthUpdateTest.php
rename to core/modules/rest/src/Tests/Update/RestExportAuthCorrectionUpdateTest.php
index 92cc917..aeca71f 100644
--- a/core/modules/rest/src/Tests/Update/RestExportAuthUpdateTest.php
+++ b/core/modules/rest/src/Tests/Update/RestExportAuthCorrectionUpdateTest.php
@@ -9,7 +9,7 @@
  *
  * @group Update
  */
-class RestExportAuthUpdateTest extends UpdatePathTestBase {
+class RestExportAuthCorrectionUpdateTest extends UpdatePathTestBase {
 
   /**
    * {@inheritdoc}
@@ -17,20 +17,20 @@ class RestExportAuthUpdateTest extends UpdatePathTestBase {
   protected function setDatabaseDumpFiles() {
     $this->databaseDumpFiles = [
       __DIR__ . '/../../../../system/tests/fixtures/update/drupal-8.bare.standard.php.gz',
-      __DIR__ . '/../../../tests/fixtures/update/rest-export-with-authentication.php',
+      __DIR__ . '/../../../tests/fixtures/update/rest-export-with-authentication-correction.php',
     ];
   }
 
   /**
-   * Ensures that update hook is run for rest module.
+   * Ensures that update hook is run for "rest" module.
    */
   public function testUpdate() {
     $this->runUpdates();
 
     // Get particular view.
-    $view = \Drupal::entityTypeManager()->getStorage('view')->load('rest_export_with_authorization');
+    $view = \Drupal::entityTypeManager()->getStorage('view')->load('rest_export_with_authorization_correction');
     $displays = $view->get('display');
-    $this->assertIdentical($displays['rest_export_1']['display_options']['auth']['basic_auth'], 'basic_auth', 'Basic authentication is set as authentication method.');
+    $this->assertIdentical($displays['rest_export_1']['display_options']['auth'], ['cookie'], 'Cookie is used for authentication');
   }
 
 }
diff --git a/core/modules/rest/src/Tests/Views/RestExportAuth.php b/core/modules/rest/src/Tests/Views/RestExportAuth.php
new file mode 100644
index 0000000..0c5d68c
--- /dev/null
+++ b/core/modules/rest/src/Tests/Views/RestExportAuth.php
@@ -0,0 +1,61 @@
+<?php
+
+namespace Drupal\rest\Tests\Views;
+
+use Drupal\views\Tests\ViewTestBase;
+
+/**
+ * Tests authentication for REST display.
+ *
+ * @group rest
+ */
+class RestExportAuth extends ViewTestBase {
+
+  /**
+   * {@inheritdoc}
+   */
+  public static $modules = ['rest', 'views_ui', 'basic_auth'];
+
+  /**
+   * {@inheritdoc}
+   */
+  public function setUp($import_test_views = TRUE) {
+    // Do not import test view.
+    parent::setUp();
+
+    $this->drupalLogin($this->drupalCreateUser(['administer views']));
+  }
+
+  /**
+   * Checks that correct authentication providers are available for choosing.
+   *
+   * @link https://www.drupal.org/node/2825204
+   */
+  public function testAuthProvidersOptions() {
+    $view_id = 'test_view_rest_export';
+    $view_label = 'Test view (REST export)';
+    $view_display = 'rest_export_1';
+    $view_rest_path = 'test-view/rest-export';
+
+    // Create new view.
+    $this->drupalPostForm('admin/structure/views/add', [
+      'id' => $view_id,
+      'label' => $view_label,
+      'show[wizard_key]' => 'users',
+      'rest_export[path]' => $view_rest_path,
+      'rest_export[create]' => TRUE,
+    ], t('Save and edit'));
+
+    $this->drupalGet("admin/structure/views/nojs/display/$view_id/$view_display/auth");
+    // The "basic_auth" will always be available since module,
+    // providing it, has the same name.
+    $this->assertField('edit-auth-basic-auth', 'Basic auth is available for choosing.');
+    // The "cookie" authentication provider defined by "user" module.
+    $this->assertField('edit-auth-cookie', 'Cookie-based auth can be chosen.');
+    // Wrong behavior in "getAuthOptions()" method makes this option available
+    // instead of "cookie".
+    // @see \Drupal\rest\Plugin\views\display\RestExport::getAuthOptions()
+    $this->assertNoField('edit-auth-user', 'Wrong authentication option is unavailable.');
+  }
+
+}
diff --git a/core/modules/rest/tests/fixtures/update/rest-export-with-authentication-correction.php b/core/modules/rest/tests/fixtures/update/rest-export-with-authentication-correction.php
new file mode 100644
index 0000000..c73b2d4
--- /dev/null
+++ b/core/modules/rest/tests/fixtures/update/rest-export-with-authentication-correction.php
@@ -0,0 +1,61 @@
+<?php
+
+/**
+ * @file
+ * Test fixture for \Drupal\rest\Tests\Update\RestExportAuthCorrectionUpdateTest.
+ */
+
+use Drupal\Core\Database\Database;
+use Drupal\Core\Serialization\Yaml;
+
+$connection = Database::getConnection();
+
+// Set the schema version.
+$connection->insert('key_value')
+  ->fields([
+    'collection' => 'system.schema',
+    'name' => 'rest',
+    'value' => 'i:8000;',
+  ])
+  ->execute();
+
+// Update core.extension.
+$extensions = $connection->select('config')
+  ->fields('config', ['data'])->condition('collection', '')
+  ->condition('name', 'core.extension')
+  ->execute()
+  ->fetchField();
+$extensions = unserialize($extensions);
+$extensions['module']['rest'] = 0;
+$extensions['module']['serialization'] = 0;
+$extensions['module']['basic_auth'] = 0;
+$connection->update('config')
+  ->fields([
+    'data' => serialize($extensions),
+  ])
+  ->condition('collection', '')
+  ->condition('name', 'core.extension')
+  ->execute();
+
+$connection->insert('config')
+  ->fields([
+    'name' => 'rest.settings',
+    'data' => serialize([
+      'link_domain' => '~',
+    ]),
+    'collection' => '',
+  ])
+  ->execute();
+
+$connection->insert('config')
+  ->fields([
+    'name' => 'views.view.rest_export_with_authorization_correction',
+  ])
+  ->execute();
+
+$connection->merge('config')
+  ->condition('name', 'views.view.rest_export_with_authorization_correction')
+  ->condition('collection', '')
+  ->fields([
+    'data' => serialize(Yaml::decode(file_get_contents('core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization_correction.yml'))),
+  ])->execute();
diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization_correction.yml
similarity index 98%
rename from core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization.yml
rename to core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization_correction.yml
index bef857f..8f99ebc 100644
--- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization.yml
+++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.rest_export_with_authorization_correction.yml
@@ -8,7 +8,7 @@ dependencies:
     - node
     - rest
     - user
-id: rest_export_with_authorization
+id: rest_export_with_authorization_correction
 label: 'Rest Export'
 module: views
 description: ''
@@ -42,7 +42,7 @@ display:
       exposed_form:
         type: basic
         options:
-          submit_button: Apply
+          submit_button: Filter
           reset_button: false
           reset_button_label: Reset
           exposed_sorts_label: 'Sort by'
@@ -204,7 +204,7 @@ display:
       display_extenders: {  }
       path: unpublished-content
       auth:
-        basic_auth: basic_auth
+        - user
     cache_metadata:
       max-age: -1
       contexts:
