Closed samuelgrant closed 4 years ago
Interesting, will look into this.
Seems to be just fine? Where are you getting the settings object from?
Seems fine with @inject too
Looks like this is a result of not using services.Configure in the AddRecaptcha methods that were recently added by @mo-esmp . Rather services.AddSingleton is called for the object which is injecting settings as RecatpchaSettings and not IOptions
In the future to follow proper standard you should always call services.Configure with the "options". This method supports Action
This is now fixed in 3.0.5.
Yes, I removed IOptions
but you rolled back code to IOptions
. I added some integration tests to validate captcha registration and I think it worth to run tests after any change.
Hi..
Your fix for #60 has worked so far as it stops the application from crashing on runtime, however it seems the settings set using the options method do not persist when they are injected into a controller...
Read me example being used:
I noticed this issue when trying to validate responses. The Validate(code) method was returning a new response object with all fields set to the default value. It may be worth throwing some sort of exception if a validation is attempted without a secret key..