diff --git a/restui.module b/restui.module
index ad6db7b..1f51899 100644
--- a/restui.module
+++ b/restui.module
@@ -36,7 +36,7 @@ function restui_theme() {
  */
 function restui_preprocess_restui_resource_info(&$variables) {
   $formats = \Drupal::getContainer()->getParameter('serializer.formats');
-  $authentication_providers = array_keys(\Drupal::service('authentication')->getSortedProviders());
+  $authentication_providers = \Drupal::service('authentication')->getProviderKeys();
   foreach ($variables['resource'] as $method => $properties) {
     if (empty($properties['supported_formats'])) {
       $variables['resource'][$method]['supported_formats'] = $formats;
diff --git a/src/Form/RestUIForm.php b/src/Form/RestUIForm.php
index ff9c6d6..b84571a 100644
--- a/src/Form/RestUIForm.php
+++ b/src/Form/RestUIForm.php
@@ -78,7 +78,7 @@ class RestUIForm extends ConfigFormBase {
     return new static(
       $container->get('config.factory'),
       $container->get('module_handler'),
-      array_keys($container->get('authentication')->getSortedProviders()),
+      $container->get('authentication')->getProviderKeys(),
       $container->getParameter('serializer.formats'),
       $container->get('plugin.manager.rest'),
       $container->get('router.builder')
