-
-
Notifications
You must be signed in to change notification settings - Fork 532
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Bug]: ReCaptcha - possible security breach + misguided documentation #5733
Comments
Hello, You do not need to commit the public key to your source code repository as any other secret. You should have something like a pipeline command running to replace the value with your production secret. It will be visible by users if they really want to see it, but again, the server validation makes it secure. Maybe we're not clear in the docs, but you should follow the google recaptcha documentation to make sure everything is implemented correctly, we do have an example that showcases the server implementation: As for the CORS error, this error is happening when communicating with your own API is this not correct? You should configure it so whatever domain you're crossing is supported, by properly configuring the cors headers. |
I think I still don't understand. I put the validation/communication with Google in the API, but it's no use if the component doesn't work. if I remove this from wasm, it doesn't work:
if I do this, it complains that the key is missing:
and from what you explained, this SiteKey is the public key, but if that were the case, not even google would be complaining about it: and I don't know any safe way to leave a key in wasm. so I don't know what I should do to implement this in blazor wasm. |
In the screenshot you send, I don't see it complaining about the public key. Like I said even the name public implies the public usage, it's the exact purpose of a public key is to be able to share it publicly. Please go over the google documentation and my previous comment to properly implement recaptcha e2e. Please let me know if you have any doubts with anything. |
Blazorise Version
all
What Blazorise provider are you running on?
Bootstrap5
Link to minimal reproduction or a simple code snippet
https://dev.streamingdiscovery.com/login-providers
Steps to reproduce
follow documentation
What is expected?
be able to connect correctly with Google and securely
What is actually happening?
I followed the example in the documentation, but I soon came across a CORS error, because I'm using WASM and the call is made from the browser. After researching, I discovered that the correct thing to do would be to call it from an API, not directly from the WEB project (no matter what settings you make in the Google Console).
But I also noticed a second problem: I saw a lot of comments from people saying that this key shouldn't be public, but private. But the documentation says that the key should be configured in program.cs, which makes it public to the user, since it's in the source code.
What browsers do you see the problem on?
Chrome
Any additional comments?
No response
The text was updated successfully, but these errors were encountered: