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

Incorrect provider in docs? #1973

Closed
NiklasBr opened this issue Feb 1, 2024 · 1 comment · Fixed by #1980
Closed

Incorrect provider in docs? #1973

NiklasBr opened this issue Feb 1, 2024 · 1 comment · Fixed by #1980

Comments

@NiklasBr
Copy link

NiklasBr commented Feb 1, 2024

When copying this section into our own Symfony 6.4 security.yaml:

security:
enable_authenticator_manager: true
firewalls:
main:
pattern: ^/
oauth:
resource_owners:
facebook: "/login/check-facebook"
google: "/login/check-google"
my_custom_provider: "/login/check-custom"
my_github: "/login/check-github"
login_path: /login
use_forward: false
failure_path: /login
oauth_user_provider:
service: my.oauth_aware.user_provider.service
provider: my.oauth_aware.user_provider.service

It looks like this:

     firewalls:
        # truncated some other firewalls for brevity
        pimcore_admin:
           oauth:
                resource_owners:
                    google: /admin/login/check-google
                login_path: /admin/login
                use_forward: false
                failure_path: /admin/login
                check_path: /admin/login/2fa-verify # Required somehow
                success_handler: GoogleSsoBundle\EventListener\AuthenticationLoginListener
                oauth_user_provider:
                    service: google.oauth_aware.user_provider.service
                provider: google.oauth_aware.user_provider.service

However, this gives an error:

Invalid firewall "pimcore_admin": user provider "google.oauth_aware.user_provider.service" not found.

It looks like the last line of the higghlighted section is the culprit, commenting it resolves the error message:

                #provider: google.oauth_aware.user_provider.service

Is this an oversight in the docs or something we are missing?

@stloyd
Copy link
Collaborator

stloyd commented Feb 16, 2024

You're right, the provider should be level below, or not set there at all.

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

Successfully merging a pull request may close this issue.

2 participants