product-is icon indicating copy to clipboard operation
product-is copied to clipboard

Improve reCAPTCHA implementation to support Google reCAPTCHA v3

Open janakamarasena opened this issue 3 years ago • 1 comments

Currently, Identity Server supports v2 of Google reCAPTCHA. Provide the support for Google reCAPTCHA v3.

janakamarasena avatar Apr 07 '21 09:04 janakamarasena

Verified Below Flows with Pack IS 6.0 RC - All the flows worked as expected without any issues. Please find the tested flows as below https://drive.google.com/file/d/1h3ynCA_1kLKPovRahbDtrtGvFYxXkbvs/view

Invisible Recaptcha with V2

Screenshot from 2022-08-06 17-11-23 Screenshot from 2022-08-06 18-13-06

  • [x] Recaptcha for SSO login (verified with pickup distpatch app, pickup dispatch manager app, myaccount)

Screenshot from 2022-08-06 16-41-57

https://user-images.githubusercontent.com/31848014/183248732-cd5fb516-434c-458c-a61c-54f51226fc26.mp4

  • [x] Recaptcha during Failed login Attempts flow

Screenshot from 2022-08-06 16-56-33

  • [x] Recaptcha During Self Registration flow

Screenshot from 2022-08-06 17-56-53

  • [x] Recover Username Flow

Screenshot from 2022-08-06 18-00-02

  • [x] Recover Password Flow

Screenshot from 2022-08-06 18-00-09

  • [x] Resend Confirmation email Flow

Screenshot from 2022-08-06 18-10-31

Recaptcha V3

  • [x] SSO login flow

https://user-images.githubusercontent.com/31848014/183249582-e98eb511-51ec-4867-ab89-0b1b5ffa8e0c.mp4

  • [x] Username Recovery

Screenshot from 2022-08-06 18-22-09

  • [x] Password Recovery

Screenshot from 2022-08-06 18-22-16

  • [x] Failed Login Attempt

Screenshot from 2022-08-06 18-22-03

  • [x] Self Registration

Screenshot from 2022-08-06 18-24-07

  • [x] Resend Confirmation email Flow

Screenshot from 2022-08-06 18-24-49

ShanikaWickramasinghe avatar Aug 06 '22 11:08 ShanikaWickramasinghe

There are multiple concerns when going forward with the implementation

  • The score returned by reCAPTCHA can vary from development environment to production environment [1]. Also if the traffic to the server is less, the accuracy of the scores will be lower [2]. Screenshot 2022-09-27 at 17 36 29

  • Currently if the score is less than the threshold, the requests are blocked by the backend. Therefore, there is a possibility of blocking out user requests due to false positives. Unlike V2, V3 does not give a captcha puzzle if the request is identified as a bot, and the documentation [1] recommends to implement actions based on our context instead of simply "blocking it".

[1] https://developers.google.com/recaptcha/docs/v3#interpreting_the_score [2] https://www.google.com/recaptcha/admin/

hwupathum avatar Sep 27 '22 12:09 hwupathum