ionic-recaptcha-android
v1.0.2
Published
This is a cordova plugin to perform Google reCAPTCHA verify on Android using the android SafetyNet package.
Downloads
4
Readme
Ionic 3 Recaptcha Plugin (Android)
This is a cordova plugin to perform Google reCAPTCHA verify on Android using the android SafetyNet package.
Based on cordova-plugin-recaptcha by @pack-internal
Motivation
We needed to use recaptcha in our app, but using web recaptcha it does not work in Ionic/Cordova, as it does not have a domain name.
And didn't find any plugin for Angular2+ so this comes to fill that hole.
Links
- Get a Key: https://www.google.com/recaptcha/admin
- Must generate a Android key
- Safetynet Recaptcha Docs: https://developer.android.com/training/safetynet/recaptcha
Installation
cordova plugin add ionic-recaptcha-android
Usage
ionViewDidLoad() {
this.platform.ready().then(() => {
(<any>window).IonicRecaptcha.verify('ANDROID_KEY', this.successCallback, this.errorCallback);
});
}
successCallback(data) {
console.log("Good, verified", data);
}
errorCallback(err) {
console.log("Bad, not verified", err);
}