OrchardCore icon indicating copy to clipboard operation
OrchardCore copied to clipboard

Implement configuration provider-based settings for the ReCaptcha module

Open Piedone opened this issue 2 years ago • 20 comments

Is your feature request related to a problem? Please describe.

You currently need to configure ReCaptcha settings from settings. This is a good and necessary way to do it, but for environment-based settings (like different for staging and prod) it'd be better to have them configurable via configuration providers too. ReCaptchaSettings is almost ready for this.

Describe the solution you'd like

Similar to what we have in a lot of other modules:

  • Provide an extension method to do environment configuration, similar to ConfigureAzureADSettings().
  • Check that everywhere where ReCaptchaSettings is used, it's used as an IOptions<ReCaptchaSettings> and not directly as site settings (except when the site settings are edited). E.g. ReCaptchaLoginFilter directly goes to site settings instead of going the options way.
  • Add corresponding docs.

This looks like a good first issue, since you just have to follow the pattern of existing implementations.

Describe alternatives you've considered

None.

Piedone avatar Jun 26 '23 15:06 Piedone

FYI @hishamco if you're interested and no one else takes on it.

Piedone avatar Jun 27 '23 13:06 Piedone

I saw it yesterday, but I was busy at that time .. hope to reply soon

hishamco avatar Jun 27 '23 13:06 hishamco

is this issue resolved?

RAHULRR1 avatar Aug 06 '23 19:08 RAHULRR1

I don't think so

hishamco avatar Aug 07 '23 12:08 hishamco

Hi @Piedone, Can I take up this issue ?

Harrish-Selvarajah avatar Sep 23 '23 18:09 Harrish-Selvarajah

Sure, that would be great! Let me know when you're done and I can review.

Piedone avatar Sep 23 '23 19:09 Piedone

Thank you! I hope I can use this thread to ask questions if I face any blockers.

Harrish-Selvarajah avatar Sep 24 '23 06:09 Harrish-Selvarajah

@Harrish-Selvarajah I assigned this to you

hishamco avatar Sep 24 '23 07:09 hishamco

Will you work on this any time soon, @Harrish-Selvarajah?

Piedone avatar Oct 16 '23 17:10 Piedone

Hey @Piedone , Work has been a bit hectic the past weeks. I'm planning to put some time this weekend.

Harrish-Selvarajah avatar Oct 16 '23 17:10 Harrish-Selvarajah

OK, thanks!

Piedone avatar Oct 16 '23 17:10 Piedone

Hi @Piedone, I'm following up on the reported issue. Could you please confirm if this enhancement is done, or if there have been any updates or resolutions since your last report?

Ankur-Thakur-NEU avatar Nov 23 '23 04:11 Ankur-Thakur-NEU

There hasn't been any work done on this to my knowledge.

Piedone avatar Nov 23 '23 14:11 Piedone

Appologies, I couldn't find the time to work on this problem. If anyone is willing to contribute their time, please do!

Harrish-Selvarajah avatar Nov 23 '23 15:11 Harrish-Selvarajah

I'll take the ticket and raise a pr soon. Thank you.

Ankur-Thakur-NEU avatar Nov 23 '23 15:11 Ankur-Thakur-NEU

Hello. Is anyone working with this issue?

meijiro-yumeru avatar Nov 17 '25 18:11 meijiro-yumeru

@Harrish-Selvarajah was planning to take it, but not

@meijiro-yumeru feel free to take it

hishamco avatar Nov 17 '25 19:11 hishamco

I’ll see what I can do, I’m just asking just in case if I could give it a try.

meijiro-yumeru avatar Nov 17 '25 20:11 meijiro-yumeru

The implementation would involve using Envrionment variable via a web service(i.e. using Amazon Aws, Google Cloud Provider, etc)?

meijiro-yumeru avatar Nov 24 '25 21:11 meijiro-yumeru

While the configs might ultimately come from an env var, you mustn't read those directly. This issue is about reading values from IShellConfiguration and use the ASP.NET Core configuration provider concept. See https://docs.orchardcore.net/en/latest/reference/modules/Configuration/.

Piedone avatar Nov 24 '25 22:11 Piedone