rx-reCAPTCHA

Additional

Language
Kotlin
Version
N/A
Created
Apr 4, 2018
Updated
Apr 17, 2019 (Retired)
Owner
Tomasz Najda (tomasznajda)
Contributor
Tomasz Najda (tomasznajda)
1
Activity
Badge
Generate
Download
Source code

rx-recaptcha


An easy way to use SafetyNet reCAPTCHA with RxJava2

Usage

1. Register a reCAPTCHA key pair

To register a key pair for use with the SafetyNet reCAPTCHA API, navigate to the reCAPTCHA Android signup site

2. Add dependency

dependencies {
    implementation "com.tomasznajda.rxrecaptcha:rxrecaptcha:16.0.0.2"
}

3. Use reCAPTCHA verification inside your Android app

ReCaptcha()
        .verify(context = this, siteKey = YOUR_SITE_KEY)
        .subscribeBy(
                onSuccess = { printToken(token = it) },
                onError = { printError(error = it) })

4. Validate reCAPTCHA response token

To learn how to validate the user's response token, see Verifying the user's response

Usage of sample

  1. Register a reCAPTCHA key pair: reCAPTCHA Android signup site
  2. Put your "Site key" inside MainActivity#YOUR_SITE_KEY constant
  3. Compile & run the app

Useful links