Closed AnaSofiaDomingos closed 1 year ago
Hey! Yes, it should. Entrypoints are tricky because multiple "authentication mechanisms" can each provider their own... but your firewall can only have one. But because you're using the new security system (enable_authenticator_manager
), you should get an exception if there are multiple (asking you to clarify which ONE entrypoint you want).
To help: what DOES happen when an anonymous user tries to go to a secure page? Is it redirected somewhere else? Do you get an exception from Symfony?
You could also try setting the entrypoint explicitly by setting entry_point
to App\Security\GoogleAuthenticator
- https://symfony.com/doc/current/security/entry_point.html
Hi, thanks for your answer.
I only have on authentication mechanism so it shouldn't be a problem.
When a anonymous user tries to go to a secure page, it's goes to infini redirection to /connect/google.
I think you need to debug that in your specific case. Please, turn on the intercept_redirects feature: https://symfony.com/doc/current/reference/configuration/web_profiler.html#intercept-redirects and try to follow the workflow again. Notice from what pages you're redirecting to that /connect/google
. It sounds like you need to exclude some paths from requiring the full authentication and allow anon users for them
It was exactly that I had some issues with my paths, thanks a lot for the help.
closing this issue.
Hello,
On a project with Symfony 6.3, I am using oauth2-client-bundle to login with google. Everything works if I navigate to /connect/google manually but it's supposed to be automatically called when needed with the AuthenticationEntryPointInterface right ? What am I missing ?
Thanks in advance for your time.
Here is my GoogleAuthenticator :
my knpu_oauth2_client.yml file :
my AuthController :
my security.yml file :