Skip to content
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

Add recaptcha script loader on beforeMount hook #252

Merged
merged 3 commits into from
Jun 21, 2019

Conversation

tkesgar
Copy link
Contributor

@tkesgar tkesgar commented Jun 16, 2019

This PR adds a script to add a <script> tag reCAPTCHA that loads the reCAPTCHA script from remote.

It is configurable from props, and currently it is opt-in (loadRecaptchaScript must be set to true).

This PR adds a script to add a <script> tag reCAPTCHA that loads the reCAPTCHA script from remote.

It is configurable from props, and currently it is opt-in (loadRecaptchaScript must be set to true).
src/Recaptcha.js Outdated Show resolved Hide resolved
@DanSnow
Copy link
Owner

DanSnow commented Jun 19, 2019

Thanks for the PR. Actually I have already added this feature at another branch. But this approach seem simpler and doesn't introduce a breaking change. I think I'll use this one.

@DanSnow
Copy link
Owner

DanSnow commented Jun 19, 2019

Also please also update the README to describe the new props

tkesgar added 2 commits June 20, 2019 09:12
Add information about loadRecaptchaScript
@DanSnow DanSnow merged commit d745501 into DanSnow:master Jun 21, 2019
@DanSnow
Copy link
Owner

DanSnow commented Jun 21, 2019

🎉

@Nettsentrisk
Copy link

Might need to add a setting for other parameters you use in the URL for loading recaptcha, such as language (hl)?

@tkesgar tkesgar deleted the patch-1 branch July 20, 2019 10:52
@tkesgar tkesgar restored the patch-1 branch July 20, 2019 10:52
@DanSnow
Copy link
Owner

DanSnow commented Jul 21, 2019

@Nettsentrisk I think the user can manually setup the API's url, so it's not necessary

@Nettsentrisk
Copy link

Isn't there only a setting for the hostname, not the entire URL? The recaptcha API URL takes up to 3 URL parameters, so it should be possible to use all of those through this to be flexible enough. Perhaps it would be easier if the user can provide the entire URL if they want/need to. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants