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

Fix access control suggestions #1991

Merged
merged 1 commit into from
Mar 4, 2024
Merged

Fix access control suggestions #1991

merged 1 commit into from
Mar 4, 2024

Conversation

Jean85
Copy link
Contributor

@Jean85 Jean85 commented Mar 2, 2024

I am trying to reconfigure an app during a Symfony 5.4 -> 6.4 upgrade. During this, I took the time to realign my use of this bundle to the standard and the recipe.

I'm not using the connect feature, and I was unable to make it work until I added the suggested line to my access control, because without that the redirect route (/connect/{service}) is hidden behind the default rule (^/ roles: ROLE_USER) and hence triggering a loop that pushes me back to the login page.

@stloyd
Copy link
Collaborator

stloyd commented Mar 2, 2024

Good catch, but I think this should be now put in step 4 dedicated to connect functionality as well we should add it to the recipe for flex.

@Jean85
Copy link
Contributor Author

Jean85 commented Mar 2, 2024

I don't think that putting it in step 4 is correct since, as I said, this has been needed for me even without the connect functionality, since the redirect URLS have the /connect prefix anyway.

@stloyd
Copy link
Collaborator

stloyd commented Mar 4, 2024

Could you point out more details? What version did you use of the bundle, the config & the best routes from the bundle & "check" routes? I'm quite confused that you needed that route without connect functionality.

@Jean85
Copy link
Contributor Author

Jean85 commented Mar 4, 2024

If you use the recipe, the redirect routes have a /connect prefix: https://github.com/symfony/recipes-contrib/blob/bb846a62aecce3622965ad34d979f5f783d65c05/hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml#L3

So, when you suggest to add a button in the login page: https://github.com/symfony/recipes-contrib/blob/bb846a62aecce3622965ad34d979f5f783d65c05/hwi/oauth-bundle/2.0/config/routes/hwi_oauth_routing.yaml#L3

That generates a /connect/{service} path, hence the need of this PR.

@stloyd stloyd merged commit 6ebc6e3 into hwi:master Mar 4, 2024
@stloyd
Copy link
Collaborator

stloyd commented Mar 4, 2024

Thanks, make sense, I think I got you wrong at first.

I will make PR to the recipes repository.

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

Successfully merging this pull request may close these issues.

2 participants