This would solve a lot spam bot sign-ups attempts, and is significantly nicer than v2 with all its puzzles.
This looks helpful: https://dev.to/morinoko/adding-recaptcha-v3-to-a-rails-app-without-a-gem-46jj
The view that would be altered is [application.html.haml](/bike/BikeBikeBike/src/branch/master/app/views/layouts/application.html.haml). This was not intuitive to find, but it is the front page so it makes sense.
Namely:
```
- if @login_dlg.present?
.dlg#login-dlg
.dlg-content
%h2.title=_'forms.actions.generic.login'
.dlg-inner
= form_tag do_confirm_path, class: 'flex-form' do
= hidden_field_tag :dest, settings_path
= emailfield :email, nil, big: true
= button :continue, value: :confirm_email
.flex-form
= link_to (_'forms.actions.generic.facebook_sign_in','Facebook Sign In'), auth_at_provider_path(provider: :facebook, dest: settings_path), class: [:button, :facebook]
%button.close.subdued=_'forms.actions.generic.cancel'
```
This is complete, and successfully blocking the sign-up bots!
There were 4 sign-up haml involved:
application/_login.html.haml
conferences/_confirm_email.html.haml
registration_steps/_sign_in.html.haml
and the before mentioned layouts/application.html.haml
The next step will be to improve the return render 'about' code in app/controllers/application_controller.rb so it goes to an actual page rather than showing in the logs a DoubleRenderError. Also, it would be nice to prevent these bots from successfully registering their attempts in the user table in the database.
This is complete, and successfully blocking the sign-up bots!
There were 4 sign-up haml involved:
```
application/_login.html.haml
conferences/_confirm_email.html.haml
registration_steps/_sign_in.html.haml
and the before mentioned layouts/application.html.haml
```
The next step will be to improve the `return render 'about'` code in [app/controllers/application_controller.rb](./src/branch/master/app/controllers/application_controller.rb) so it goes to an actual page rather than showing in the logs a DoubleRenderError. Also, it would be nice to prevent these bots from successfully registering their attempts in the user table in the database.
This would solve a lot spam bot sign-ups attempts, and is significantly nicer than v2 with all its puzzles.
This looks helpful: https://dev.to/morinoko/adding-recaptcha-v3-to-a-rails-app-without-a-gem-46jj
The view that would be altered is application.html.haml. This was not intuitive to find, but it is the front page so it makes sense.
Namely:
This is complete, and successfully blocking the sign-up bots!
There were 4 sign-up haml involved:
The next step will be to improve the
return render 'about'
code in app/controllers/application_controller.rb so it goes to an actual page rather than showing in the logs a DoubleRenderError. Also, it would be nice to prevent these bots from successfully registering their attempts in the user table in the database.