Giter Club home page Giter Club logo

Comments (5)

Flajt avatar Flajt commented on May 21, 2024 1

Seems to do the trick, thanks again.

from mcaptcha.

realaravinth avatar realaravinth commented on May 21, 2024

When you you don't use a form, do mean you use JavaScript to upload data to the server?

@mcaptcha/core-glue JavaScript library is responsible for communicating with the widget. Specifically, handle listens for messages from the widget and passes to a higher level (web framework variants that we have) library to inject into the form.

A custom implementation of the core-glue library will allow you to not only retrieve the token efficiently but also reset the widget. Resetting, like you say, will have to be done by page refresh only. Having two-way communication between the protected page and the widget can be messy, so I want to avoid that 😅

Feel free to ignore: I might be missing something, but can you please explain why you would want to reset the widget? Usually, the visitor will be advanced to the protected resource, after successful CAPTCHA validation. But the case you describe requires the visotir to solve the CAPTCHA again.

from mcaptcha.

Flajt avatar Flajt commented on May 21, 2024

Thanks, yep I'm using the token to send it to a server with JS. Currently the CAPTCHA is more or less for rate limiting & somewhat access controll in my case. The user can create upload a document to my site, the site will hash it and then proceeds to send the hash to my backend with the CAPTCHA token, there some data will be looked up and send back to the site. A small summary of this will be displayed to the user.

The user should be able to upload another document, if he wants, afterwards, but I can't reset the site as some information is still beeing displayed (otherwise the user wouldn't see the results).

The webpage is at it's current form to small that I didnt want to use webframeworks since it seems overkill (it's only two pages). I would link to the page but it's currently not published with the part we are talking about xD (some stuff doesn't work yet)

I hope my text makse sense xD
I might just add a reset button which will refresh the page and that might work for now.

from mcaptcha.

realaravinth avatar realaravinth commented on May 21, 2024

Thanks for explaining! I think I understand it, if you want to show the CAPTCHA to the user again, then removing the iframe with JavaScript and creating it again when needed also works?

from mcaptcha.

Flajt avatar Flajt commented on May 21, 2024

Might be worth a shot, I will try this in the next couple of days. Thank you

from mcaptcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.