šŸ”“ January 2024 Alert: Forum support inactive!
New forum registration are currently closed.
Use GitHub discussions
.

    UVdesk

    • Login
    • Search
    • Recent

    Solved Add Google recaptcha

    General Discussion
    6
    56
    18815
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • peopleinside
      peopleinside EX helping member last edited by peopleinside

      Resolved.
      Instruction:

      On vendor/uvdesk/support-center-bundle/Resources/views/Knowledgebase/ticket.html.twig
      Open ticket.html.twig

      find the line (98):

      <button type="submit" id="create-ticket-btn" class="uv-btn">{{ 'Create Ticket'|trans }}</button>
      

      in the row before you will find (97):

      <div class="uv-element-block">
      

      before that line add on line (96):

      <div class="clearfix"></div>
      <div class="g-recaptcha" data-sitekey="YOUR SITE KEY"></div>
      <div class="clearfix"></div>
      

      now find some rows below in the script check (153)

      'reply' : {
      required : true,
      msg : '{{ "This field is mandatory"|trans }}'
      },
      

      after that add (on line 154):

      'g-recaptcha-response' : {
      fn: function(value) {
      if(grecaptcha.getResponse().length > 0)
      return false;
      else
      return true;
      },
      msg : 'Please select CAPTCHA'
      }
      

      save and clean cache.

      This will work only for ticket page, for protect login page I have no idea.

      šŸ’¬ You can also ask help on GitHub Discussions
      šŸ”“ I am no more active on Uvdesk
      šŸ”“ Forum support is inactive!

      1 Reply Last reply Reply Quote 0
      • peopleinside
        peopleinside EX helping member last edited by peopleinside

        If the UVdesk staff can tell me how add reCaptcha also on operator login page I will be gratefu.
        Security is very important to me, I want protect as the best possible the login page.
        Maybe also customer login page.

        I tried but was unable to do on the login page.
        First of all I need add the line with the recaptcha script

        <script src='https://www.google.com/recaptcha/api.js'></script>
        

        I was able also to place the recaptcha but I'm unable to required it. It broken the page as when press submit the login page doesn't work... so please can you help me? ☺

        In the login pages can I insert the invisible recaptcha? I need the steps please.

        šŸ’¬ You can also ask help on GitHub Discussions
        šŸ”“ I am no more active on Uvdesk
        šŸ”“ Forum support is inactive!

        1 Reply Last reply Reply Quote 0
        • Sanjeev
          Sanjeev developer UVdesk Staff last edited by

          @peopleinside said in Add Google recaptcha:

          If the UVdesk staff can tell me how add reCaptcha also on operator login page I will be gratefu.
          Security is very important to me, I want protect as the best possible the login page.
          Maybe also customer login page.

          You can add google recaptcha here for admin side.

          https://github.com/uvdesk/core-framework/blob/master/Resources/views/Snippets/createMemberTicket.html.twig

          peopleinside 1 Reply Last reply Reply Quote 0
          • peopleinside
            peopleinside EX helping member @Sanjeev last edited by

            @Sanjeev I don't wanna have recaptcha on operator ticket creation but on login page.

            šŸ’¬ You can also ask help on GitHub Discussions
            šŸ”“ I am no more active on Uvdesk
            šŸ”“ Forum support is inactive!

            1 Reply Last reply Reply Quote 0
            • Sanjeev
              Sanjeev developer UVdesk Staff last edited by

              @peopleinside

              You can add it here.

              https://github.com/uvdesk/core-framework/blob/master/Resources/views/login.html.twig

              peopleinside 1 Reply Last reply Reply Quote 0
              • peopleinside
                peopleinside EX helping member @Sanjeev last edited by

                @Sanjeev Yes, thanks!
                As I said I was able to insert and see the visual ReCaptcha but unable to ask as mandatory and see the login form working.

                Without a guide to how to do I will not be able to insert ReCaptcha there.
                Thanks anyway made a more stronger password for the operator.

                šŸ’¬ You can also ask help on GitHub Discussions
                šŸ”“ I am no more active on Uvdesk
                šŸ”“ Forum support is inactive!

                1 Reply Last reply Reply Quote 0
                • Sanjeev
                  Sanjeev developer UVdesk Staff last edited by

                  @peopleinside
                  You need to define a name field for recaptcha as same we have added for input field.

                  https://github.com/uvdesk/core-framework/blob/master/Resources/views/login.html.twig#L35

                  And make it required here as same we did for _username.
                  https://github.com/uvdesk/core-framework/blob/master/Resources/views/login.html.twig#L94

                  And check if it works for you !!

                  peopleinside 2 Replies Last reply Reply Quote 0
                  • peopleinside
                    peopleinside EX helping member @Sanjeev last edited by

                    @Sanjeev great, thanks! Maybe I forget the input type!
                    I will try, thanks!

                    šŸ’¬ You can also ask help on GitHub Discussions
                    šŸ”“ I am no more active on Uvdesk
                    šŸ”“ Forum support is inactive!

                    1 Reply Last reply Reply Quote 0
                    • peopleinside
                      peopleinside EX helping member @Sanjeev last edited by

                      @Sanjeev nothing, still unable to do.
                      I give up

                      šŸ’¬ You can also ask help on GitHub Discussions
                      šŸ”“ I am no more active on Uvdesk
                      šŸ”“ Forum support is inactive!

                      1 Reply Last reply Reply Quote 0
                      • peopleinside
                        peopleinside EX helping member last edited by

                        Issues: https://forums.uvdesk.com/topic/1869/issue-with-recaptcha

                        šŸ’¬ You can also ask help on GitHub Discussions
                        šŸ”“ I am no more active on Uvdesk
                        šŸ”“ Forum support is inactive!

                        1 Reply Last reply Reply Quote 0
                        • darikelwan
                          darikelwan last edited by

                          i also want to add Google recaptchabut facing some issues in API call, try this method.

                          Darik elwan

                          1 Reply Last reply Reply Quote 1
                          • peopleinside
                            peopleinside EX helping member last edited by

                            I created a GitHub issue requesting a better management of the reCaptcha.
                            https://github.com/uvdesk/community-skeleton/issues/368

                            šŸ’¬ You can also ask help on GitHub Discussions
                            šŸ”“ I am no more active on Uvdesk
                            šŸ”“ Forum support is inactive!

                            1 Reply Last reply Reply Quote 0
                            • Sanjeev
                              Sanjeev developer UVdesk Staff last edited by

                              @peopleinside

                              We also want to provide recaptcha but the problem is a key need to generate for your site from https://www.google.com/recaptcha/ here to use recaptcha into your site and which is unique code for the site as project is opensource(no fix domain or site) so person need to set it up for themselves.

                              But still we will check if we just write code for that and once you enter your recaptcha code for your site then it will enable for you !!

                              peopleinside 1 Reply Last reply Reply Quote 0
                              • peopleinside
                                peopleinside EX helping member @Sanjeev last edited by peopleinside

                                @Sanjeev I use other application different from uvdesk, for example a live chat system.
                                I know is possibile add an option in the admin side where user can activate reCaptcha.

                                SharedScreenshot.jpg

                                For example in live helper chat you have a setting where you can set the secret code for reCaptcha than activate.
                                If reCaptcha is active is showed on login page, if not is not active and not showed.

                                The same should be possible also in Uvdesk.

                                šŸ’¬ You can also ask help on GitHub Discussions
                                šŸ”“ I am no more active on Uvdesk
                                šŸ”“ Forum support is inactive!

                                1 Reply Last reply Reply Quote 0
                                • Sanjeev
                                  Sanjeev developer UVdesk Staff last edited by

                                  @peopleinside

                                  Is live chat self hosted ?

                                  peopleinside 1 Reply Last reply Reply Quote 0
                                  • peopleinside
                                    peopleinside EX helping member @Sanjeev last edited by peopleinside

                                    @Sanjeev yes it is. I use on my server.
                                    https://helpdesk.peopleinside.it/it/
                                    https://livehelperchat.com/3.07-google-re-captcha-in-login-window-522a.html
                                    https://livehelperchat.com/demo-12c.html
                                    https://demo.livehelperchat.com/site_admin/system/recaptcha

                                    šŸ’¬ You can also ask help on GitHub Discussions
                                    šŸ”“ I am no more active on Uvdesk
                                    šŸ”“ Forum support is inactive!

                                    1 Reply Last reply Reply Quote 0
                                    • Sanjeev
                                      Sanjeev developer UVdesk Staff last edited by

                                      @peopleinside

                                      Fine, We will check the possibility with our system and will try to add this.

                                      peopleinside 1 Reply Last reply Reply Quote 1
                                      • peopleinside
                                        peopleinside EX helping member @Sanjeev last edited by

                                        @Sanjeev will be very useful. Thanks.
                                        I updated my previous reply with more link. You have also live helper chat demo online to see how it looks on admin side.

                                        šŸ’¬ You can also ask help on GitHub Discussions
                                        šŸ”“ I am no more active on Uvdesk
                                        šŸ”“ Forum support is inactive!

                                        1 Reply Last reply Reply Quote 0
                                        • ali sami farooq
                                          ali sami farooq last edited by

                                          This thread is very interesting and gives a good knowledge , i will try to add google recaptcha by this method ~ Ali Sami Farooq

                                          Ali Sami Farooq

                                          1 Reply Last reply Reply Quote 0
                                          • Sanjeev
                                            Sanjeev developer UVdesk Staff last edited by

                                            @peopleinside

                                            Please generate Recaptcha keys (site key and secret key) for your domain if you need Recaptcha for your site we have updated the code for the same but need to test it for a live domain.

                                            When you will be available reply back to us will will process further.

                                            peopleinside 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post