Open Closed

How to enable reCaptcha in ABP #489


User avatar
0
alper created
Support Team Director

ABP has integrated Google reCaptcha. I want to enable reCaptcha. How to enable it?


9 Answer(s)
  • User Avatar
    1
    liangshiwei created
    Support Team Fullstack Developer

    Enable reCaptcha is easy.

    Open the account settings page and select the checkbox. (you can use the 6LeEZ-kUAAAAAGdgiM9BoWiRKBZOeULch73OlyZP key and 6LeEZ-kUAAAAADBrLM1zkIy0mF_4rbBp3toA6zIJ secret for test)

    Now, return to login page. you will see the reCaptcha is working.

    There are some options.

    • Verify base url Usually you don't need to set, But if your country cannot access Google services, you need to set the value. For China, the value should be https://recaptcha.google.cn/
    • Version Version of reCaptcha
    • Site key Site key of reCaptcha
    • Site secret Site secret of reCaptcha

    You can get the reCaptcha key and secret at https://www.google.com/recaptcha/about/ You can get your Site key and Site secret from https://www.google.com/recaptcha/admin

  • User Avatar
    0
    nick.pham-mwp created

    Hi @liangshiwei,

    Cc @alper and @maliming,

    Thanks for your kind instructions here.

    I know it is silly to ask but it would be greatly appreciated if you could please kindly provide me with further details on how to get to the account setting page with the options as per your screenshot(s) above, please.

    Our code base has been upgraded to ABP version 3.3 and this is how our Angular UI looks like:

    I am unable to see the recaptcha tab to set those settings as per instructions above.

    Your kind help is greatly appreciated.

    Thanks

    Nick

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi @nick.pham-mwp,

    Angular UI will be available in version 4.0.

  • User Avatar
    0
    nick.pham-mwp created

    thanks for your kind response @liangshiwei. Much appreciated.

    May I ask another question to know if Recaptcha is available on Blazor (ABP 3.3) or Razor MVC (ABP 3.3) please?

    • On Razor MVC (ABP 3.3), I can see the account setting page with the options as per your screenshot(s) above, but any change cannot be saved: "error on server" exception is thrown and a popup is shown.
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    It is available in 3.3,Can you share the error log and provide steps to reproduce?

  • User Avatar
    0
    nick.pham-mwp created

    hi @liangshiwei, i have emailed you the logs and steps taken

    thanks. Nick

  • User Avatar
    0
    nick.pham-mwp created

    hi @liangshiwei,

    I have managed to update the ReCaptcha settings via Swagger API (please see details in my email to you last night) with my registered site key & secret for my domain. The login UI from IdentityServer version 3.3 (regardless of Angular or Razor or Blazor, we all have to go through IdentityServer Login UI) indicates that the feature is available. However, there is no way we can provide our answer there to bypass the ReCaptcha validation, therefore, we cannot log in at all even though we provide the correct credentials

    Is there anything else I need to configure/do to properly use this feature please?

    Your kind help is greatly appreciated, please.

    Nick

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi @nick.pham-mwp

    I think your application configuration has some problem. can you create a new question to discuss? thanks.

  • User Avatar
    0
    nick.pham-mwp created

    hi @liangshiwei,

    I have created the support ticket https://support.abp.io/QA/Questions/553/ABP-reCaptcha as per your recommendation. I have also emailed you the source codes, logs and link to our websites.

    thank you for your kind help

    Nick

Made with ❤️ on ABP v9.1.0-preview. Updated on November 11, 2024, 11:11