Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I implement ReCaptcha in a Single Page Application (SPA)

I have a Single Page Application (SPA) I would like to add ReCaptcha to. This application is hosted using IIS as flat Html, Css & Javascript, this SPA in turn talks to a separate REST server (using CORS) for all dynamic content.

The REST server is written using ASP.net WebAPI. The problem is; all examples I have seen of ReCaptcha all use ASP.net MVC (or other languages) to inject html into the webpage, I cannot modify the webpage using ASP.net in this manor. Hopefully someone else has had the same problem.

I am really looking for some 2 parts, first the HTML that belongs on the client, and secondly the Controller that would be on the REST Server to verify with google. Even if this is in another language that I can convert, this will be useful!

like image 920
Josh Mc Avatar asked May 22 '14 04:05

Josh Mc


1 Answers

Looks like what I wanted was simply to use reCaptcha without plugins (https://developers.google.com/recaptcha/docs/display)

like image 191
Josh Mc Avatar answered Sep 20 '22 20:09

Josh Mc