Unclear authentication error message

Created on 15 September 2025, 6 days ago
Updated 16 September 2025, 6 days ago

I kept getting this error in my watchdog message when testing the MCP module:

Path: /mcp/post. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: The used authentication method is not allowed on this route. in Drupal\Core\EventSubscriber\AuthenticationSubscriber->onExceptionAccessDenied() (line 135 of /var/www/html/docroot/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php).

The error message could be improved by specifying which authentication method was involved. In this case, it was basic_auth. Knowing that would have saved me about an hour when debugging.

Proposed help text: The authentication method %name is not allowed on this route.

We could also consider specifying which authentication methods are allowed instead.

Feature request
Status

Active

Version

11.0 🔥

Component

base system

Created by

🇧🇪Belgium Dries

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • Merge request !13267Resolve #3546804 "Unclear authentication error" → (Open) created by ankitv18
  • Pipeline finished with Failed
    4 days ago
    Total: 110s
    #602219
  • Pipeline finished with Failed
    4 days ago
    Total: 183s
    #602221
  • Pipeline finished with Failed
    4 days ago
    Total: 648s
    #602222
  • Pipeline finished with Canceled
    4 days ago
    Total: 276s
    #602244
  • Pipeline finished with Success
    4 days ago
    Total: 504s
    #602251
Production build 0.71.5 2024