Guide
Tutoriel sur reCAPTCHA
En utilisant @capgo/capacitor-recaptcha
Générez des jetons reCAPTCHA et reCAPTCHA Enterprise à partir des applications Web, Android et iOS Capacitor.
Installer
npm install @capgo/capacitor-recaptcha
npx cap sync
Configurer
import type { CapacitorConfig } from '@capacitor/cli';
import '@capgo/capacitor-recaptcha';
const config: CapacitorConfig = {
plugins: {
Recaptcha: {
androidSiteKey: 'ANDROID_SITE_KEY',
iosSiteKey: 'IOS_SITE_KEY',
webSiteKey: 'WEB_SITE_KEY',
enterprise: true,
},
},
};
export default config;
Utiliser enterprise: false only when the Web implementation should load standard reCAPTCHA v3 instead of reCAPTCHA Enterprise. Android and iOS use Google's Enterprise/mobile SDK path and reject enterprise: false.
Générer un jeton
import { Recaptcha } from '@capgo/capacitor-recaptcha';
const { token } = await Recaptcha.execute({
action: 'login',
});
Envoyez le jeton à votre serveur backend et créez une évaluation reCAPTCHA avant d'accepter la demande protégée.
Référence complète
- GitHub: https://github.com/Cap-go/capacitor-recaptcha/
- Documentation : /docs/plugins/recaptcha/
Continuez de là depuis l'utilisation de @capgo/capacitor-recaptcha
Si vous utilisez L'utilisation de @capgo/capacitor-recaptcha pour planifier l'authentification et les flux de compte, connectez-l’avec @capgo/capacitor-recaptcha pour les détails d'implémentation dans @capgo/capacitor-recaptcha Prise en main pour les détails d'implémentation dans Prise en main @capgo/capacitor-social-login pour les détails d'implémentation dans @capgo/capacitor-social-login capgo/capacitor-passkey pour les détails d'implémentation dans capgo/capacitor-passkey, et capgo/capacitor-native-biometric pour les détails d'implémentation dans capgo/capacitor-native-biometric.