Rails/Devise. Include captcha response param within sign_in processNo route matches “/users/sign_out” devise rails 3Rails 3.1 Devise — How do I let users create an account with just an email?Ruby on Rail: Add Polymorphic address to Devise userHow to call devise sign_in and sign_out methods of devise from another controller different from devise?RoR Rails 3 Devise::SessionsController fails to authenticate existing userHow to add authentication before filter to a rails 3 apps with devise for user sign up and sign in?Rails3 devise / omniauth - password_required? and form_for :validate => true don't work togetherDevise warden 401 Unauthorized when wrong credentialsRails, Devise & Omniauth - problems with setupDevise/Rails login not working - “invalid email or password”

Extract string from each line of a file

LED glows slightly during soldering

How to drill holes in 3/8" thick steel plates?

Is there any reason why MCU changed the Snap to Blip

Sharing shapefile collection

Received a dinner invitation through my employer's email, is it ok to attend?

How quality assurance engineers test calculations?

Is a request to book a business flight ticket for a graduate student an unreasonable one?

How were Martello towers supposed to work?

Has anyone in space seen or photographed a simple laser pointer from Earth?

Print the last, middle and first character of your code

Some interesting calculation puzzle that I made

Can the Mage Hand cantrip be used to trip an enemy who is running away?

Single word for "refusing to move to next activity unless present one is completed."

Integer Lists of Noah

Is there a strong legal guarantee that the U.S. can give to another country that it won't attack them?

Why is the air gap between the stator and rotor on a motor kept as small as it is?

When an electron changes its spin, or any other intrinsic property, is it still the same electron?

Shortest hex dumping program

For a hashing function like MD5, how similar can two plaintext strings be and still generate the same hash?

How to tell someone I'd like to become friends without letting them think I'm romantically interested in them?

Should disabled buttons give feedback when clicked?

Why return a static pointer instead of an out parameter?

What's the point of having a RAID 1 configuration over incremental backups to a secondary drive?



Rails/Devise. Include captcha response param within sign_in process


No route matches “/users/sign_out” devise rails 3Rails 3.1 Devise — How do I let users create an account with just an email?Ruby on Rail: Add Polymorphic address to Devise userHow to call devise sign_in and sign_out methods of devise from another controller different from devise?RoR Rails 3 Devise::SessionsController fails to authenticate existing userHow to add authentication before filter to a rails 3 apps with devise for user sign up and sign in?Rails3 devise / omniauth - password_required? and form_for :validate => true don't work togetherDevise warden 401 Unauthorized when wrong credentialsRails, Devise & Omniauth - problems with setupDevise/Rails login not working - “invalid email or password”






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















Without making a custom Sessions controller that inherits from the hidden devise controller, I want to figure out a way of adding the parameter, "g-recaptcha-response" to be included in the authenticating process from the default devise view.



Here's my view with the recaptcha figure included. When I click on it I do get a response when my app calls the SessionController#create method. I'm trying to figure out how to make this process detect that the captcha form has been clicked and authenticates the user logging in because of it.



<h2>Log in</h2>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>

<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "off" %>
</div>

<% if devise_mapping.rememberable? -%>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end -%>

<div class="g-recaptcha" data-sitekey="6LeeL5gUAAAAADbq0vt4d9biAs8oegkPx9ttUkKb"></div>

<div class="actions">
<%= f.submit "Log in" %>
</div>

<% end %>
<%= link_to 'Sign Up', new_user_registration_path %>


In essence, if a bot were to attempt automatically signing in repeatedly, the devise controller would see that the captcha was not clicked and stops them from trying to log in.










share|improve this question






















  • Hi! Do you use a custom registration controller for Devise? If yes, could you add t the code to your question?

    – Jeremie
    Mar 26 at 6:02











  • Check this github.com/igorkasyanchuk/new_google_recaptcha for google captcha, it doesn't require to click captcha

    – Igor Kasyanchuk
    Mar 26 at 8:30











  • Well, I do have a custom registration controller, but logging in with devise has to do with the sessions controller. I was taking a look at the new google recaptcha and it seems pretty cool. How would I coordinate the captcha form with the Sessions#create method?

    – Klarkel Goldvein
    Mar 26 at 23:14











  • Igor, is this gem capable of using a captcha was clicked or used when I login through devise as your documentation shows that it only works with devise if I'm creating a new user?

    – Klarkel Goldvein
    Mar 27 at 21:53

















0















Without making a custom Sessions controller that inherits from the hidden devise controller, I want to figure out a way of adding the parameter, "g-recaptcha-response" to be included in the authenticating process from the default devise view.



Here's my view with the recaptcha figure included. When I click on it I do get a response when my app calls the SessionController#create method. I'm trying to figure out how to make this process detect that the captcha form has been clicked and authenticates the user logging in because of it.



<h2>Log in</h2>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>

<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "off" %>
</div>

<% if devise_mapping.rememberable? -%>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end -%>

<div class="g-recaptcha" data-sitekey="6LeeL5gUAAAAADbq0vt4d9biAs8oegkPx9ttUkKb"></div>

<div class="actions">
<%= f.submit "Log in" %>
</div>

<% end %>
<%= link_to 'Sign Up', new_user_registration_path %>


In essence, if a bot were to attempt automatically signing in repeatedly, the devise controller would see that the captcha was not clicked and stops them from trying to log in.










share|improve this question






















  • Hi! Do you use a custom registration controller for Devise? If yes, could you add t the code to your question?

    – Jeremie
    Mar 26 at 6:02











  • Check this github.com/igorkasyanchuk/new_google_recaptcha for google captcha, it doesn't require to click captcha

    – Igor Kasyanchuk
    Mar 26 at 8:30











  • Well, I do have a custom registration controller, but logging in with devise has to do with the sessions controller. I was taking a look at the new google recaptcha and it seems pretty cool. How would I coordinate the captcha form with the Sessions#create method?

    – Klarkel Goldvein
    Mar 26 at 23:14











  • Igor, is this gem capable of using a captcha was clicked or used when I login through devise as your documentation shows that it only works with devise if I'm creating a new user?

    – Klarkel Goldvein
    Mar 27 at 21:53













0












0








0








Without making a custom Sessions controller that inherits from the hidden devise controller, I want to figure out a way of adding the parameter, "g-recaptcha-response" to be included in the authenticating process from the default devise view.



Here's my view with the recaptcha figure included. When I click on it I do get a response when my app calls the SessionController#create method. I'm trying to figure out how to make this process detect that the captcha form has been clicked and authenticates the user logging in because of it.



<h2>Log in</h2>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>

<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "off" %>
</div>

<% if devise_mapping.rememberable? -%>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end -%>

<div class="g-recaptcha" data-sitekey="6LeeL5gUAAAAADbq0vt4d9biAs8oegkPx9ttUkKb"></div>

<div class="actions">
<%= f.submit "Log in" %>
</div>

<% end %>
<%= link_to 'Sign Up', new_user_registration_path %>


In essence, if a bot were to attempt automatically signing in repeatedly, the devise controller would see that the captcha was not clicked and stops them from trying to log in.










share|improve this question














Without making a custom Sessions controller that inherits from the hidden devise controller, I want to figure out a way of adding the parameter, "g-recaptcha-response" to be included in the authenticating process from the default devise view.



Here's my view with the recaptcha figure included. When I click on it I do get a response when my app calls the SessionController#create method. I'm trying to figure out how to make this process detect that the captcha form has been clicked and authenticates the user logging in because of it.



<h2>Log in</h2>

<%= form_for(resource, as: resource_name, url: session_path(resource_name)) do |f| %>
<div class="field">
<%= f.label :email %><br />
<%= f.email_field :email, autofocus: true, autocomplete: "email" %>
</div>

<div class="field">
<%= f.label :password %><br />
<%= f.password_field :password, autocomplete: "off" %>
</div>

<% if devise_mapping.rememberable? -%>
<div class="field">
<%= f.check_box :remember_me %>
<%= f.label :remember_me %>
</div>
<% end -%>

<div class="g-recaptcha" data-sitekey="6LeeL5gUAAAAADbq0vt4d9biAs8oegkPx9ttUkKb"></div>

<div class="actions">
<%= f.submit "Log in" %>
</div>

<% end %>
<%= link_to 'Sign Up', new_user_registration_path %>


In essence, if a bot were to attempt automatically signing in repeatedly, the devise controller would see that the captcha was not clicked and stops them from trying to log in.







ruby-on-rails devise captcha






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 26 at 1:38









Klarkel GoldveinKlarkel Goldvein

184 bronze badges




184 bronze badges












  • Hi! Do you use a custom registration controller for Devise? If yes, could you add t the code to your question?

    – Jeremie
    Mar 26 at 6:02











  • Check this github.com/igorkasyanchuk/new_google_recaptcha for google captcha, it doesn't require to click captcha

    – Igor Kasyanchuk
    Mar 26 at 8:30











  • Well, I do have a custom registration controller, but logging in with devise has to do with the sessions controller. I was taking a look at the new google recaptcha and it seems pretty cool. How would I coordinate the captcha form with the Sessions#create method?

    – Klarkel Goldvein
    Mar 26 at 23:14











  • Igor, is this gem capable of using a captcha was clicked or used when I login through devise as your documentation shows that it only works with devise if I'm creating a new user?

    – Klarkel Goldvein
    Mar 27 at 21:53

















  • Hi! Do you use a custom registration controller for Devise? If yes, could you add t the code to your question?

    – Jeremie
    Mar 26 at 6:02











  • Check this github.com/igorkasyanchuk/new_google_recaptcha for google captcha, it doesn't require to click captcha

    – Igor Kasyanchuk
    Mar 26 at 8:30











  • Well, I do have a custom registration controller, but logging in with devise has to do with the sessions controller. I was taking a look at the new google recaptcha and it seems pretty cool. How would I coordinate the captcha form with the Sessions#create method?

    – Klarkel Goldvein
    Mar 26 at 23:14











  • Igor, is this gem capable of using a captcha was clicked or used when I login through devise as your documentation shows that it only works with devise if I'm creating a new user?

    – Klarkel Goldvein
    Mar 27 at 21:53
















Hi! Do you use a custom registration controller for Devise? If yes, could you add t the code to your question?

– Jeremie
Mar 26 at 6:02





Hi! Do you use a custom registration controller for Devise? If yes, could you add t the code to your question?

– Jeremie
Mar 26 at 6:02













Check this github.com/igorkasyanchuk/new_google_recaptcha for google captcha, it doesn't require to click captcha

– Igor Kasyanchuk
Mar 26 at 8:30





Check this github.com/igorkasyanchuk/new_google_recaptcha for google captcha, it doesn't require to click captcha

– Igor Kasyanchuk
Mar 26 at 8:30













Well, I do have a custom registration controller, but logging in with devise has to do with the sessions controller. I was taking a look at the new google recaptcha and it seems pretty cool. How would I coordinate the captcha form with the Sessions#create method?

– Klarkel Goldvein
Mar 26 at 23:14





Well, I do have a custom registration controller, but logging in with devise has to do with the sessions controller. I was taking a look at the new google recaptcha and it seems pretty cool. How would I coordinate the captcha form with the Sessions#create method?

– Klarkel Goldvein
Mar 26 at 23:14













Igor, is this gem capable of using a captcha was clicked or used when I login through devise as your documentation shows that it only works with devise if I'm creating a new user?

– Klarkel Goldvein
Mar 27 at 21:53





Igor, is this gem capable of using a captcha was clicked or used when I login through devise as your documentation shows that it only works with devise if I'm creating a new user?

– Klarkel Goldvein
Mar 27 at 21:53












0






active

oldest

votes










Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348673%2frails-devise-include-captcha-response-param-within-sign-in-process%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes




Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.







Is this question similar to what you get asked at work? Learn more about asking and sharing private information with your coworkers using Stack Overflow for Teams.



















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55348673%2frails-devise-include-captcha-response-param-within-sign-in-process%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript