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.만약 Manual Setup을 선호한다면, 플러그인을 설치하기 위해 다음 명령어를 실행하고 아래의 플랫폼별 설명서를 따르세요.
npm install @capgo/capacitor-recaptchanpx cap sync사이트 키를 구성하세요.
사이트 키를 구성하는 섹션Google Cloud reCAPTCHA에서 플랫폼 키를 생성한 다음 __CAPGO_KEEP_2__에 추가하세요. 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_2__과 webSiteKey __CAPGO_KEEP_3__를 재정의하세요. siteKey. 환경에 따라 키가 달라질 때는 직접 siteKey 로 전달할 수 있습니다. load() 또는 execute() when the key depends on your environment.
토큰을 생성하세요.
제목이 “토큰을 생성하세요.”인 섹션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() 클라이언트가 준비되지 않은 경우 자동으로 호출되므로 명시적 로드 단계는 선택 사항입니다. load() 웹 표준 reCAPTCHA v3
제목이 “웹 표준 reCAPTCHA v3”인 섹션
설정Generate A Token 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 이주 옵션으로도 받아들이며 sitekeyWeb 새로운 __CAPGO_KEEP_1__에 대해 Capacitor config 이름을 선호합니다. sitekeyIos Getting Started에서 계속하세요 sitekeyIOS as iOS migration aliases. Prefer the Capacitor config names for new code.
__CAPGO_KEEP_1__
시작부터 계속하기__CAPGO_KEEP_0__에서 __CAPGO_KEEP_1__-recaptcha를 사용하는 경우 시작하기 인증 및 계정 흐름을 계획하고 __CAPGO_KEEP_0__를 연결하는 경우 capgo/capacitor-recaptcha를 사용하는 native 기능 capgo/capacitor-recaptcha를 사용하는 capgo/capacitor-recaptcha 구현 세부 사항 capgo/capacitor-social-login 구현 세부 사항 capgo/capacitor-passkey 구현 세부 사항 capgo/capacitor-passkey 구현 세부 사항 capgo/capacitor-native-biometric 구현 세부 사항 capgo/capacitor-native-biometric 구현 세부 사항 for the implementation detail in @capgo/capacitor-native-biometric, and 두 단계 인증 for the implementation detail in 두 단계 인증.