Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Sumeet Singhal 20 posts 109 karma points
    Mar 13, 2018 @ 18:38
    Sumeet Singhal
    0

    Apply Captcha on Backend login page

    Does anyone applied Captcha on Backend login page till now for security reasons?

  • Sumeet Singhal 20 posts 109 karma points
    Mar 15, 2018 @ 06:39
    Sumeet Singhal
    0

    Is anyone did this before?

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Mar 15, 2018 @ 08:54
    Alex Skrypnyk
    0

    Hi Sumeet

    Why do you need this reCaptcha?

    Umbraco user can be locked after few login attempts, captcha needed for a spam protection?

    /Alex

  • Sumeet Singhal 20 posts 109 karma points
    Mar 15, 2018 @ 14:01
    Sumeet Singhal
    0

    Yeah exactly, do you have any reference for this,after how many attempts? I saw similar option there on wordpress login page as well.

    Its for basically robot check.

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Mar 15, 2018 @ 14:04
    Alex Skrypnyk
    0

    Hi Sumeet

    Yes if you entered your credentials wrong 5 times, you will be looked out. You can set maxInvalidPasswordAttempts to a different value for the UsersMembershipProvider in your web.config file. For example maxInvalidPasswordAttempts="15".

    Thanks,

    Alex

  • Alex Skrypnyk 6132 posts 23951 karma points MVP 7x admin c-trib
    Nov 12, 2018 @ 11:06
    Alex Skrypnyk
    0

    Hi Sumeet

    Did you find a way to do it?

    Alex

  • liran 59 posts 140 karma points
    Dec 17, 2020 @ 13:05
    liran
    0

    i see this is an old post, but i did it. if it still relevant , post it hear and i will post the code.

  • Tuna 8 posts 88 karma points
    Mar 03, 2021 @ 20:54
    Tuna
    0

    Hi Liran ,can you share with me

  • Queenie Wong 6 posts 77 karma points
    Jun 08, 2021 @ 11:34
    Queenie Wong
    0

    Hi Liran,

    Could you share the code here? This is exactly what I looking for!

    Thanks, Queenie

  • liran 59 posts 140 karma points
    Sep 12, 2021 @ 11:25
    liran
    0

    hi, this is for reCaptcha V2, the login file is in: \umbraco\Views\common\dialogs\Login.html.

    i put this line in the top

    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
    

    this line in row 38

    <div class="g-recaptcha" data-sitekey="SiteKey" id="captcha"></div>
    

    also in line 171:

                       <div class="g-recaptcha" data-sitekey="SiteKey" id="captcha"></div>
    

    in the file: \umbraco\Js\umbraco.controllers.js line 1175 is the check i added my localhost because it's annoying:

     if (document.location.origin == 'http://localhost:62451') {
    
            }
            else {
                alert('else');
                var v = grecaptcha.getResponse();
    
                if (v.length == 0) {
                    document.getElementById('captcha').innerHTML = "Captcha Code empty Or Incorrect, please refresh the page";
                    return false;
                }
                else {
                    document.getElementById('captcha').innerHTML = "Captcha completed";
                }
            }
    

    hope it helps :)

Please Sign in or register to post replies

Write your reply to:

Draft