iOS セットアップ
インストール手順とこのプラグインの全マークダウンガイドを含むセットアップ用の質問をコピーする
サイトキー
「サイトキー」というセクションCapacitorアプリで使用するバンドル識別子を登録し、次にキーを設定してください。 capacitor.config.ts.
iOSはGoogleの RecaptchaEnterprise SDK。通常の非Enterprise reCAPTCHA v3はこのプラグインでWebのみで利用可能です。 enterprise: false iOSでは拒否されます。
import type { CapacitorConfig } from '@capacitor/cli';import '@capgo/capacitor-recaptcha';
const config: CapacitorConfig = { plugins: { Recaptcha: { iosSiteKey: 'IOS_SITE_KEY', }, },};
export default config;Dependency
Section titled “Dependency”のプラグインはCocoaPodsとSwift Package Managerのメタデータを提供します。 RecaptchaEnterprise のiOS SDK. これを実行すると npx cap sync ios installs the native dependency through your selected Capacitor iOS workflow.
Execute
Section titled “Execute”import { Recaptcha } from '@capgo/capacitor-recaptcha';
const { token } = await Recaptcha.execute({ action: 'password_reset', timeout: 10000,});Send the token to your backend immediately and create a reCAPTCHA assessment before accepting the protected request.
Keep going from iOS Setup
Section titled “Keep going from iOS Setup”If you are using iOS セットアップ を使用して認証とアカウントフローを計画し、 Using @capgo/capacitor-recaptcha for the native capability in Using @capgo/capacitor-recaptcha, Using @capgo/capacitor-recaptcha @capgo/capacitor-social-login @capgo/capacitor-passkey @capgo/capacitor-social-login @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-native-biometric, and @__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-passkey __CAPGO_KEEP_0__の実装詳細については、2要素認証の詳細を参照してください。