Project

General

Profile

Actions

Bug #96371

closed

Strange error with custom Frontend AuthenticationService in TYPO3 11 TLS

Added by Markus Pircher over 2 years ago. Updated 8 months ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Authentication
Target version:
-
Start date:
2021-12-16
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

I have a custom AuthenticationService in my extension (subtypes: getUserFE,authUserFE), which I have been using since v8 TLS and which also works fine in v9 and v10.

But with v11 I get an error, the service itself seems to work:

The default controller for extension "Felogin" and plugin "Login" can not be determined. Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.

Even if the debug log says that I was successfully logged in and that a session was created, I am not logged in after reloading the login form.


Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #95580: Wrong ConfigurationManager in Frontend Ajax callNew2021-10-12

Actions
Actions #1

Updated by Markus Pircher over 2 years ago

I load configurations from ConfigurationManager, maybe that's the problem?
I thought before that the problem was something else (#95580)
Apparently the BackendConfigurationManager is being created here, and so the controller/action information is missing.

Actions #2

Updated by Benni Mack over 2 years ago

  • Status changed from New to Needs Feedback

Interesting, are you loading the Extbase context out of the Authentication service? I guess at this point we don't have the "id" (= which page is selected) information yet. Do you have any special Route Enhancers?

Actions #3

Updated by Benni Mack over 2 years ago

  • Related to Bug #95580: Wrong ConfigurationManager in Frontend Ajax call added
Actions #4

Updated by Markus Pircher over 2 years ago

The problem lies in TYPO3\CMS\Extbase\Configuration\ConfigurationManager->initializeConcreteConfigurationManager

At the time of authentication, the $GLOBALS['TYPO3_REQUEST'] object does not exist, which is why the BackendConfigurationManager is used.

In the meantime I have refactored my service so that I no longer need the configuration manager and moved the settings from Typescript to extension settings.

Actions #5

Updated by Christian Kuhn about 2 years ago

  • Status changed from Needs Feedback to Closed

Hey. I hope it's ok to close here for now: using the extbase frontend configuration manager within an auth service is probably not a really great idea - using FE TS in authentication-chain in general probably isn't. Seems you solved you issue differently meanwhile, so it's hopefully ok to close here since core should not support this, imho.

Actions #6

Updated by Jacco van der Post over 1 year ago

I notice in TYPO3 11 if I use repositories in AuthenticationService getUser(), I get the error

The controller "Login" is not allowed by plugin "Login". Please check for TYPO3\CMS\Extbase\Utility\ExtensionUtility::configurePlugin() in your ext_localconf.php.

This worked fine in 9.5

Took me some time to figure this out. Had no choice than to rebuild the whole process with queryBuilder.

Also I noticed that __construct doesn't work for repositories:

Too few arguments to function __construct(), 0 passed
Actions #7

Updated by Florian Rival 8 months ago

Same problem for me with TYPO3 V11 but it was caused by using ConfigurationManagerInterface in constructor.

    public function __construct(ConfigurationManagerInterface $configurationManager)
    {
    }

and also using StandaloneView or FluidEmail :

    $view = GeneralUtility::makeInstance(StandaloneView::class);
Actions

Also available in: Atom PDF