top of page

Odoo with Google reCAPTCHA Keys

  • Writer: Bernard Bryan Hayashi
    Bernard Bryan Hayashi
  • 3 hours ago
  • 1 min read

CAPTCHA is a security service from Google that protects websites from bots and automated abuse. In simple terms, it helps websites check “Are you a real human or a bot?” 


How it works

When you visit a website and try to:

  • submit a form

  • log in

  • create an account

  • post a comment


In Odoo, to enhance the security login to the portal or odoo backend login, you can get this Google reCaptcha



  1. Navigate to Odoo reCAPTCHA setting


  2. Enable and click “generate reCAPTCHA keys”

  1. Fill in the google reCAPTCHA page

 

  1. Wait for keys to be generated, copy keys to Odoo

  2. Save Settings in Odoo page

Note: there may be delay of up to 30 minutes before captcha is working properly. Until then, captcha will automatically succeed

  1. (Optional) Change reCAPTCHA security


    Code Changes for Login Captcha

    1. Settings to toggle on/off reCAPTCHA

    2. Inherit login controller

    If reCAPTCHA is setup, get response from reCAPTCHA frontend (JS Function) and send request to Google’s reCAPTCHA API to verify. If successful, proceed with original odoo login function, else redirect back to login page with captcha error message

    3. Inherit Login XML – add reCAPTCHA widget and script to disable login


reCAPTCHA Preview


Comments


Subscribe Form

  • facebook
  • linkedin

©2019 by Excelroot Technology Sdn Bhd.

bottom of page