@capgo/capacitor-recaptcha 사용
웹, 안드로이드, iOS Capacitor 앱에서 reCAPTCHA 및 reCAPTCHA Enterprise 토큰을 생성합니다.
설치
npm install @capgo/capacitor-recaptcha
npx cap sync
설정
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;
사용 enterprise: false 웹 구현이 표준 reCAPTCHA v3 대신 reCAPTCHA Enterprise를 로드해야 하는 경우에만 사용하십시오. 안드로이드 및 iOS는 Google의 Enterprise/mobile SDK 경로를 사용하고 SDK을 거부합니다. enterprise: false.
토큰 생성
import { Recaptcha } from '@capgo/capacitor-recaptcha';
const { token } = await Recaptcha.execute({
action: 'login',
});
보안 요청을 수락하기 전에 백엔드에 토큰을 보내 reCAPTCHA 평가를 생성하십시오.
전체 참조
- GitHub: https://github.com/Cap-go/capacitor-recaptcha/
- 문서: /docs/plugins/recaptcha/
Keep going from Using @capgo/capacitor-recaptcha
Capacitor-ReCAPTCHA를 사용 중이시면 Using @capgo/capacitor-recaptcha 인증 및 계정 흐름을 계획하는 데 사용하는 경우 @capgo/capacitor-recaptcha for the implementation detail in @capgo/capacitor-recaptcha, Getting Started Getting Started의 implementation detail을 확인하려면 @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, and @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric.