oauth2-server-bundle icon indicating copy to clipboard operation
oauth2-server-bundle copied to clipboard

The child config "authorization_server" under "league_oauth2_server" must be configured.

Open Elemor opened this issue 3 years ago • 10 comments

Hello! I've tried to install this bundle via composer, but at the installation process, it caused this error:

The child config "authorization_server" under "league_oauth2_server" must be configured.

The "authorization_server" and "league_oauth2_server" are found only in vendor, exactly in league dir.

Any help will be great!

Elemor avatar Nov 25 '21 14:11 Elemor

Hi @Elemor make first the conf file as explain here https://github.com/thephpleague/oauth2-server-bundle/blob/master/docs/index.md and create the private and public keys, then you can run again the composer require cmd ;)

Ak1r0 avatar Nov 25 '21 23:11 Ak1r0

I have this issue as well on Symfony 5.4, seems like there must be a bug with the symfony flex recipe?

image

johnvanham avatar Dec 10 '21 09:12 johnvanham

I tried this again on Symfony 5.3 and it worked without needing to create the file manually. So that does suggest something isn't right with the recipe on Symfony 5.4? That said, it didn't try and create any config files either.

johnvanham avatar Dec 10 '21 10:12 johnvanham

Guys, first create YAML configuration, and then install bundle with composer. Doc describe installation process in failed order - to first install and then create config. I've already installed this bundle and all works perfectly.

@Ak1r0 Maybe the best solution will be when in the recipe You create a basic configuration for SF 5.x? This should fix this problem for the future.

adambanaszkiewicz avatar Jan 17 '22 08:01 adambanaszkiewicz

I met the same problem during installation. For security, the vendor assembly is required first, and then I copy the assembled vendor and configs to production. When using this bundle, the error is in the absence of a default configuration.

@chalasr The solution is simple. Write a recipe for a bundle that, when installed, will copy the default config to the config folder.

Now in docker I just copy to app/config/packages/league_oauth2_server.yaml default config.

Myks92 avatar Jan 31 '22 18:01 Myks92

Yep, we need a recipe. Thanks for the ping, I'll do that this week.

chalasr avatar Jan 31 '22 18:01 chalasr

Yep, we need a recipe. Thanks for the ping, I'll do that this week.

Thank you. Waiting for recipe.

Myks92 avatar Jan 31 '22 18:01 Myks92

Yep, we need a recipe. Thanks for the ping, I'll do that this week.

Any news on the recipe?

jasonpeltzer avatar Feb 18 '22 06:02 jasonpeltzer

Thanks a lot for your work, but it seems like the recipe is still missing, @chalasr any news about it?

sdespont avatar Oct 04 '22 07:10 sdespont

Here is the recipe: https://github.com/symfony/recipes/pull/1130 Support reactions welcome there 🙏

chalasr avatar Oct 05 '22 19:10 chalasr