ArkoseLabs / recaptcha-migration-guide

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Steps to switch from reCaptcha to Arkose Enforcement Challenge

  1. Read over our Developer Guides for Standard setup and Server-side
  2. Private and Public key pair
  3. Client-Side integration
  4. Server-Side integration

Developer Guide

Here is our external facing Developer Guide which includes the Standard Setup

Keys

Your keys which will be shown in the dashboard.arkoselabs.com for both public and private. If you do not have any keys please reach out to your Sales Rep or Sales Engineer.

Client Side Integration

<html>
  <head>
    <title>reCAPTCHA demo: Simple page</title>
    <script src="https://www.google.com/recaptcha/api.js" async defer></script>
  </head>
  <body>
    <form action="?" method="POST">
      <div class="g-recaptcha" data-sitekey="your_site_key"></div>
      <br/>
      <input type="submit" value="Submit">
    </form>
  </body>
</html>

to

<html>
<head>
 <script src="//client-api.arkoselabs.com/v2/INSERT_PUBLIC_KEY/api.js" data-callback="setupEnforcement" async defer></script>
</head>
<body>
 <script>   
    function setupEnforcement(myEnforcement) {
      myEnforcement.setConfig({ 
        selector: '#enforcement-trigger',
        onCompleted: function(response) {
          var token = response.token.toString();
        }
      });
    }
 </script>
</body>
</html>

Update public key from the Arkose dashboard

Server Side Integration

You're likely using a reCaptcha library but Arkose does not provide a stand alone library. There is however sample code provided here.

Private Key

Update secret key to the Arkose Labs private key located in your dashboard

Replace parameter

g-recaptcha-response becomes the Session_tokenie verification

Update POST URL

Make a POST request to the Verify Endpoint and include a session token containing the value of the response.token from the response object.

https://www.google.com/recaptcha/api/siteverify

to

https://verify-api.arkoselabs.com/api/v3/verify/

About