views:

256

answers:

3

Has anyone used reCaptcha on their iPhone application? I am trying to figure out how to embed it in my App...

+7  A: 

Why in the name of Bob would you do that?

I think it's a fair assumption that when someone is accessing your application from an iPhone, they are human.

Edit: You do know that this is the purpose of a Captcha, right? Verifying sapience?

Williham Totland
+1 for sapience :D
Jasarien
I want to do this because for example someone who signs up on the iPhone to my website, they are human but what if a hacker uses the http protocol sign up string and spams my website? I guess a work around is to know the request is coming from an iphone. How do you check for that?
Erika
You can add a (random) secret to your request, and (optionally) connect with SSL. In short, have some bit of code that generates a unique identifier that (with high likelyhood) comes from the iPhone app; so that each request becomes unique, and spoofing it becomes non-trivial.
Williham Totland
(A difficult one to breach would be a secret concatenated with the current time and securely hashed (SHA256 should do the trick). Just be sure to send the current time from the device along.)
Williham Totland
Another trick to make it even safer is to use some insane date format for stringifying the date before concatenation, and sending the date along to the server on a sane format: `sha256("secret" CAT "MM/DD/YY")` => server, along with YYYYMMDDYHHMMSS
Williham Totland
Thanks Williham totland, you have some great ideas! I ended up using the last suggestion you made.
Erika
@user280556: you did remember to replace "secret" with an actual secret, right?
Williham Totland
A: 

you guys are really talking about digest authentication. There are valid reasons for making the iphone use recaptcha. I need a solution for this myself :(

Richard
A: 

The only way to use reCaptcha in an iPhone app is by rendering a WebView within the app. There is a nice alternative to reCaptcha called kaptcha that actually has a usable api. http://code.google.com/p/kaptcha/

Sasi