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

Version 2 from Arbitrary Domains #130

Closed
brendon opened this issue Jun 29, 2015 · 7 comments
Closed

Version 2 from Arbitrary Domains #130

brendon opened this issue Jun 29, 2015 · 7 comments

Comments

@brendon
Copy link
Contributor

brendon commented Jun 29, 2015

Some of you may have been wondering how to use v2 of Recaptcha with an arbitrary domain. Apparently it's possible via a special attribute:

developer guide for secure token 2

developer guide for secure token 2 2

I was wondering if it would be possible to add this parameter as a runtime configuration option, or perhaps have the private key as a configuration parameter and have the rest calculated automatically for each request if it's present?

@brendon
Copy link
Contributor Author

brendon commented Jul 19, 2015

Any chance of some movement on this?

@ambethia
Copy link
Owner

Sorry, I completely hadn't looked at this yet. Can you add some test coverage for this?

@brendon
Copy link
Contributor Author

brendon commented Jul 20, 2015

Hi @ambethia :) That's all good.

My question was basically, how would I test this? I had a hard time figuring our where it'd fit in your suite, and you seem to have a lot of those kind of tests skipped anyway?

The actual results shouldn't change (i.e. integration tests should still pass if the extra code works as intended), the only difference would be that you don't have to pre-specify domains on google's web interface beforehand (so this is hard to test automatically).

@ambethia
Copy link
Owner

A lot of them are skipped, I'm just trying to stay ahead of not making that situation worse. Looking at the code, there really is no logic (that belongs to this library) to test, any tests would just be testing that the crypto stuff does it's job. As long as the existing test suite still passes, this shouldn't be a problem.

Thanks!

@brendon
Copy link
Contributor Author

brendon commented Jul 20, 2015

Thanks Jason, glad to have that merged in! Would you be able to release a new gem? :)

Have a great day!

@ambethia
Copy link
Owner

I need to look through some of the other open PRs then ill do a release, maybe this weekend?

@brendon
Copy link
Contributor Author

brendon commented Jul 21, 2015

Sounds good to me :)

@brendon brendon closed this as completed Jul 21, 2015
wfschmitt pushed a commit to wfschmitt/recaptcha that referenced this issue Sep 24, 2017
With reference to ambethia#130 this
change generates a secure_token based on a random uuid and the integer
time in milliseconds as a JSON message. This is encrypted using the
‘private_key’ and sent to google as a data attribute.
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

No branches or pull requests

2 participants