{"id":1001,"date":"2024-10-12T16:05:32","date_gmt":"2024-10-12T16:05:32","guid":{"rendered":"https:\/\/www.cmsgalaxy.com\/blog\/?p=1001"},"modified":"2024-11-24T07:47:17","modified_gmt":"2024-11-24T07:47:17","slug":"how-to-enable-google-captcha-in-flarum","status":"publish","type":"post","link":"https:\/\/www.cmsgalaxy.com\/blog\/how-to-enable-google-captcha-in-flarum\/","title":{"rendered":"How to enable google Captcha in Flarum?"},"content":{"rendered":"\n<p>To enable <strong>Google reCAPTCHA<\/strong> in <strong>Flarum<\/strong>, you&#8217;ll need to use an extension that supports reCAPTCHA integration. <strong>FoF reCAPTCHA<\/strong> is a commonly used extension for Flarum that allows you to integrate Google&#8217;s reCAPTCHA into your forum to prevent spam and automated sign-ups.<\/p>\n\n\n\n<p>Here&#8217;s a step-by-step guide on how to enable <strong>Google reCAPTCHA<\/strong> in Flarum using the <strong>FoF reCAPTCHA<\/strong> extension:<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: <strong>Install FoF reCAPTCHA Extension<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>SSH into your server<\/strong> and navigate to your Flarum installation directory.<\/li>\n\n\n\n<li>Run the following command to install the <strong>FoF reCAPTCHA<\/strong> extension via Composer:<\/li>\n\n\n\n<li><code><code>composer require fof\/recaptcha<\/code><\/code><\/li>\n\n\n\n<li>After the installation is complete, <strong>clear the Flarum cache<\/strong>:<\/li>\n\n\n\n<li><code>php flarum cache:clear<\/code><\/li>\n\n\n\n<li><strong>Enable the extension<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Go to your <strong>Flarum Admin Panel<\/strong> (<code>https:\/\/yourdomain.com\/admin<\/code>).<\/li>\n\n\n\n<li>Navigate to the <strong>Extensions<\/strong> tab.<\/li>\n\n\n\n<li>Find the <strong>FoF reCAPTCHA<\/strong> extension and enable it.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: <strong>Get Google reCAPTCHA API Keys<\/strong><\/h3>\n\n\n\n<p>You need to get the <strong>Site Key<\/strong> and <strong>Secret Key<\/strong> from Google to integrate reCAPTCHA with your Flarum forum.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the <a>Google reCAPTCHA Admin Console<\/a>.<\/li>\n\n\n\n<li><strong>Register a new site<\/strong>:\n<ul class=\"wp-block-list\">\n<li><strong>Label<\/strong>: Enter a name for your site (e.g., &#8220;WakilSahab Flarum Forum&#8221;).<\/li>\n\n\n\n<li><strong>reCAPTCHA Type<\/strong>: Choose <strong>reCAPTCHA v2<\/strong> and select either:\n<ul class=\"wp-block-list\">\n<li><strong>&#8220;I&#8217;m not a robot&#8221; Checkbox<\/strong> or<\/li>\n\n\n\n<li><strong>Invisible reCAPTCHA<\/strong> (depending on your preference).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Domains<\/strong>: Add your forum domain, e.g., <code>wakilsahab.in<\/code>.<\/li>\n\n\n\n<li><strong>Owners<\/strong>: Enter your email address.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Accept the reCAPTCHA Terms<\/strong> and click <strong>Submit<\/strong>.<\/li>\n\n\n\n<li>You will be provided with the <strong>Site Key<\/strong> and <strong>Secret Key<\/strong>. Keep these keys handy.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: <strong>Configure reCAPTCHA in Flarum<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Go back to your Flarum Admin Panel<\/strong> and navigate to <strong>Extensions &gt; FoF reCAPTCHA<\/strong> settings.<\/li>\n\n\n\n<li>Enter the <strong>Site Key<\/strong> and <strong>Secret Key<\/strong> you got from Google.<\/li>\n\n\n\n<li>Configure the following options:\n<ul class=\"wp-block-list\">\n<li><strong>reCAPTCHA Type<\/strong>: Choose between <strong>Checkbox<\/strong> or <strong>Invisible reCAPTCHA<\/strong>, depending on what you configured in Google reCAPTCHA.<\/li>\n\n\n\n<li><strong>Enable reCAPTCHA on Login\/Registration<\/strong>: You can enable reCAPTCHA for:\n<ul class=\"wp-block-list\">\n<li>Registration forms (to prevent bot sign-ups).<\/li>\n\n\n\n<li>Login forms (to prevent brute force attacks).<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Save the settings<\/strong>.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: <strong>Test Google reCAPTCHA Integration<\/strong><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Logout<\/strong> from the admin panel and go to the <strong>registration page<\/strong> or <strong>login page<\/strong>.<\/li>\n\n\n\n<li>You should now see the <strong>Google reCAPTCHA<\/strong> challenge (either the checkbox or invisible reCAPTCHA based on your choice).<\/li>\n\n\n\n<li>Try signing up or logging in to make sure the reCAPTCHA works as expected.<\/li>\n<\/ol>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Optional: <strong>Adjust reCAPTCHA Behavior<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If you want to tweak the reCAPTCHA&#8217;s sensitivity, you can adjust the security settings in the <a>Google reCAPTCHA Admin Console<\/a>.<\/li>\n\n\n\n<li>You can also disable reCAPTCHA for specific forms (like login) in the <strong>FoF reCAPTCHA<\/strong> extension settings.<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">Troubleshooting<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>reCAPTCHA not showing<\/strong>: Ensure that you&#8217;ve correctly entered the <strong>Site Key<\/strong> and <strong>Secret Key<\/strong> and that the reCAPTCHA API is enabled for the domain you entered in Google&#8217;s Admin Console.<\/li>\n\n\n\n<li><strong>Cache issues<\/strong>: If the reCAPTCHA doesn\u2019t appear after enabling, try clearing Flarum\u2019s cache again:bashCopy code<code>php flarum cache:clear<\/code><\/li>\n\n\n\n<li><strong>Test on different browsers<\/strong>: Sometimes browser settings or extensions can block reCAPTCHA. Test the functionality on different browsers to ensure it&#8217;s working properly.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>To enable Google reCAPTCHA in Flarum, you&#8217;ll need to use an extension that supports reCAPTCHA integration. FoF reCAPTCHA is a<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1001","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/1001","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/comments?post=1001"}],"version-history":[{"count":2,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/1001\/revisions"}],"predecessor-version":[{"id":1052,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/posts\/1001\/revisions\/1052"}],"wp:attachment":[{"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/media?parent=1001"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/categories?post=1001"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cmsgalaxy.com\/blog\/wp-json\/wp\/v2\/tags?post=1001"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}