OrchardCMS / OrchardCore

Orchard Core is an open-source modular and multi-tenant application framework built with ASP.NET Core, and a content management system (CMS) built on top of that framework.
https://orchardcore.net
BSD 3-Clause "New" or "Revised" License
7.46k stars 2.41k forks source link

"The AzureAD Authentication is not correctly configured." warning when Azure AD is configured from the environment #14050

Open Piedone opened 1 year ago

Piedone commented 1 year ago

Describe the bug

You get a "The AzureAD Authentication is not correctly configured." warning logged, coming from here, when Azure AD settings are configured from the environment, not site settings, via ConfigureAzureADSettings().

To Reproduce

Steps to reproduce the behavior:

  1. Configure Azure AD settings with ConfigureAzureADSettings().
  2. Launch the app.
  3. Observe the warning being logged immediately.

Expected behavior

No warning is logged when the configuration comes from the environment. However, a warning should be logged if no available configuration is correct.

ns8482e commented 9 months ago

Yes! warning message is misleading, however the order is correct. Settings are loaded first from settings by Configure and then overridden from appsettings config via PostConfigure .

So warning should state what it finds i.e. The AzureAD Authentication is not configured in site settings.

Piedone commented 9 months ago

If the feature is configured correctly, regardless of where the config is coming from, then there should be no warning at all.

hishamco commented 9 months ago

Is this fixed in the related PR, or shall I submit a PR?

Piedone commented 8 months ago

It's isn't, and we won't do https://github.com/OrchardCMS/OrchardCore/issues/15310.

github-actions[bot] commented 3 weeks ago

We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).

This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.