Getting Started
이 플러그인을 설치하는 데 필요한 단계와 전체 마크다운 가이드를 포함한 설정 프롬프트를 복사합니다.
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-recaptcha`
Run the required Capacitor sync/update step after installation.
Read this markdown guide for the full setup steps: https://raw.githubusercontent.com/Cap-go/website/refs/heads/main/apps/docs/src/content/docs/docs/plugins/recaptcha/getting-started.mdx
Use that guide for platform-specific steps, native file edits, permissions, config changes, imports, and usage setup.
If that guide references other docs pages, read them too.
설치
설치설치 플러그인을 사용하기 위해 AI-Assisted Setup을 사용할 수 있습니다. AI 도구에 Capgo 스킬을 추가하려면 다음 명령어를 사용하세요.
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins__CAPGO_KEEP_1__
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-recaptcha` plugin in my project.__CAPGO_KEEP_2__
npm install @capgo/capacitor-recaptchanpx cap sync__CAPGO_KEEP_4__
__CAPGO_KEEP_5____CAPGO_KEEP_6__ capacitor.config.ts.
import type { CapacitorConfig } from '@capacitor/cli';import '@capgo/capacitor-recaptcha';
const config: CapacitorConfig = { appId: 'com.example.app', appName: 'Example', webDir: 'dist', plugins: { Recaptcha: { androidSiteKey: 'ANDROID_SITE_KEY', iosSiteKey: 'IOS_SITE_KEY', webSiteKey: 'WEB_SITE_KEY', enterprise: true, }, },};
export default config;androidSiteKey, iosSiteKey__CAPGO_KEEP_8__ webSiteKey __CAPGO_KEEP_9__ siteKey. 당신은 환경에 따라 키가 의존하는 경우 siteKey directly를 load() or execute() 를 직접 전달할 수도 있습니다.
Generate A Token
Section titled “Generate A Token”import { Recaptcha } from '@capgo/capacitor-recaptcha';
const { token } = await Recaptcha.execute({ action: 'login',});
await fetch('/api/recaptcha-assessment', { method: 'POST', headers: { 'content-type': 'application/json' }, body: JSON.stringify({ token, action: 'login' }),});execute() calls load() 자동으로 클라이언트가 준비되지 않은 경우, 명시적 로드 단계는 선택 사항입니다.
Web Standard reCAPTCHA v3
Section titled “Web Standard reCAPTCHA v3”Set enterprise: false 구글의 표준 웹 reCAPTCHA v3 스크립트를 로드하기 위해.
const { token } = await Recaptcha.execute({ siteKey: 'WEB_V3_SITE_KEY', enterprise: false, action: 'signup',});안드로이드 및 iOS에서 구글의 네이티브 모바일 SDK 경로는 Enterprise/mobile 전용입니다. native 플랫폼에서 SDK를 전달하면 표준 웹 v3 키가 의도치 않게 사용되지 않습니다. enterprise: false 이동 노트
이동 노트 섹션
플러그인은 Cordova 옵션의 구형 별칭을 받습니다.콜 옵션과 __CAPGO_KEEP_0__ config에서. sitekeyAndroid iOS 마이그레이션 별칭으로도 받습니다. __CAPGO_KEEP_0__ config 이름을 새로운 __CAPGO_KEEP_1__에 사용하는 것을 선호합니다. sitekeyWeb in call options and Capacitor config. It also accepts sitekeyIos __CAPGO_KEEP_0__ sitekeyIOS as iOS migration aliases. Prefer the Capacitor config names for new code.
__CAPGO_KEEP_0__
Getting Started에서 계속 진행하는 방법이미 Getting Started를 사용 중이라면 Getting Started 인증 및 계정 흐름을 계획하고자 할 때 Cloudflare의 @capgo/capacitor-recaptcha Cloudflare의 @capgo/capacitor-recaptcha를 사용하는 native capability @capgo/capacitor-social-login @capgo/capacitor-social-login의 implementation detail @capgo/capacitor-passkey @capgo/capacitor-passkey의 implementation detail @capgo/capacitor-native-biometric @capgo/capacitor-native-biometric의 implementation detail 두 단계 인증 __CAPGO_KEEP_0__