Can not save the posthog settings form - The used authentication method is not allowed on this route

Created on 11 December 2024, about 2 months ago

Problem/Motivation

When just trying to save the Posthog Setings form at /admin/config/services/posthog to set the Posthog API Key, the form doesn't save and instead I get logged out and see the following error in log:

Pfad: /admin/config/services/posthog. Symfony\Component\HttpKernel\Exception\AccessDeniedHttpException: The used authentication method is not allowed on this route. in Drupal\Core\EventSubscriber\AuthenticationSubscriber->onExceptionAccessDenied() (Zeile 135 von /web/core/lib/Drupal/Core/EventSubscriber/AuthenticationSubscriber.php).

Looking for possible reasons, it seems to me that maybe the "host" key in the form is a problem for a contrib module?

We're using the jsonapi stack. I have no other idea yet, as the form is very very simple... or am I missing something?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Code (posthog)

Created by

🇩🇪Germany Anybody Porta Westfalica

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @Anybody
  • 🇩🇪Germany Anybody Porta Westfalica

    For now I set the key in config, but this is really strange!

  • 🇩🇪Germany Grevil

    Just ran into the same issue! Really weird!

  • 🇩🇪Germany Grevil

    OK, this only happens in an internal project. And isn't related to the module itself.

    I will open an internal ticket.

  • 🇩🇪Germany Anybody Porta Westfalica

    Nice, thanks @Grevil!

    Can we reproduce this with any other form?

    Looking for possible reasons, it seems to me that maybe the "host" key in the form is a problem for a contrib module?

    We should check with a different key name first.

  • 🇩🇪Germany Grevil

    This won't be the reason, as the issue is not reproducible outside birapa. Also, the access is denied before we even access the submitForm call. Its most likely some access checker module we have enabled.

    The key might be a problem for THAT module, if there is one.

  • 🇩🇪Germany Grevil

    Nope, changing the form elements id to something else doesn't fix the issue.

Production build 0.71.5 2024