Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Symfony 7.2: $authenticator must be ..., bad type given #198

Open
4 tasks done
Ajtak opened this issue Dec 30, 2024 · 3 comments
Open
4 tasks done

Symfony 7.2: $authenticator must be ..., bad type given #198

Ajtak opened this issue Dec 30, 2024 · 3 comments

Comments

@Ajtak
Copy link

Ajtak commented Dec 30, 2024

Checklist

  • I have looked into the Readme and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

Error on APP_ENV=dev

Auth0\Symfony\Controllers\AuthenticationController::__construct(): Argument #1 ($authenticator) must be of type Auth0\Symfony\Security\Authenticator, Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator given, called in ./var/cache/dev/ContainerKCOMItL/getAuthenticationControllerService.php on line 25

Reproduction

  1. Install symfony 7.2
  2. Follow docs
  3. Go to /login. This error showing here.

Additional context

When I put the following definition in config/services.yaml, it seems to work correctly.
Unfortunately, I have no idea why. Probably some kind of magic :)

Note the oddity on the $authenticator line.

Auth0\Symfony\Controllers\AuthenticationController:
   arguments:
       $authenticator: '@debug.auth0.authenticator.inner'
       $router: '@router'

jwt-auth-bundle version

0

Symfony version

7.2

PHP version

8.3

@Ajtak Ajtak changed the title Symfony 7.2: $authenticatormust be of type Auth0\Symfony\Security\Authenticator, Symfony\Component\Security\Http\Authenticator\Debug\TraceableAuthenticator given Symfony 7.2: $authenticator must be ..., bad type given Dec 30, 2024
@tomasvts
Copy link

tomasvts commented Jan 9, 2025

Its a symfony issue
symfony/symfony#59091

@kishore7snehil
Copy link
Contributor

kishore7snehil commented Jan 10, 2025

As suggested by @tomasvts , @Ajtak looks like it's a symfony issue .

@Geosedra
Copy link

Just composer update to get 7.2.2 and issue solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants