Coder Social home page Coder Social logo

Use with authlogic-oid about recaptcha HOT 4 CLOSED

ambethia avatar ambethia commented on July 26, 2024
Use with authlogic-oid

from recaptcha.

Comments (4)

ambethia avatar ambethia commented on July 26, 2024

The easiest way is probably to check verify_recaptcha before beginning the @user.save block. It's really just a matter of handling your app's logic in a way that's most appropriate for you.

from recaptcha.

rurounijones avatar rurounijones commented on July 26, 2024

The problem with this is that upon registration and passing the captcha test you are redirected to the openid page. Once you pass that you are directed back to the create action and the captcha code kicks in again and fails.

  1. Submit form to the user create action
  2. Pass verify_captcha
  3. Get redirected to the external openid authorisation page
  4. Authorise the site and get redirected back to the user create action
  5. Fail the captcha test

A way is needed of calling verify_captcha only upon the initial form submission and not when being redirected back to from the external openid auth page. This needs to be done in a way that cannot be exploited to skip the captcha

This is the problem I cannot figure out. The code above is basically the example authlogic-oid code, nothing specific to my app so figuring this out should help everyone else who wants to combine this.

from recaptcha.

ambethia avatar ambethia commented on July 26, 2024

you could save the results in session, say, session[:captcha_verified] ||= verify_recaptcha, then check that before doing the authlogic-oid stuff.

from recaptcha.

rurounijones avatar rurounijones commented on July 26, 2024

Obviously simple answer that I naturally missed. That worked perfectly. Thank you

from recaptcha.

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.