GFlisch / Arc4u.Guidance.Doc

Other
5 stars 1 forks source link

(Bug, guidance 2022.2.1.9, 04/11/2022) Configuration mismatch in generated code for Blazor #76

Closed vvdb-architecture closed 1 year ago

vvdb-architecture commented 1 year ago

When you generate a Blazor client, the appsettings.XXX.json contains:

  "OAuth2.Client.Settings": {
       ...
  }

... but Program.cs contains:

    builder.Configuration.Bind("Blazor.OAuth2.Client.Settings", options.ProviderOptions.Authentication);
    foreach (var scope in builder.Configuration["OAuth2.Settings:Scopes"].Split(new[] { ',' }))

The minimal change is to change OAuth2 to Blazor.OAuth2.Client in Program.cs in the second string and to rename OAuth2.Client.Settings in all the json files.

GFlisch commented 1 year ago

Already changed in the template repo => Should be already fixed.