メイン コンテンツにスキップ
@capgo/capacitor-recaptcha セキュリティ & 認証 オープンソース

reCAPTCHA Capacitor プラグイン

Web reCAPTCHA または reCAPTCHA Enterprise のトークンを生成するプラスネイティブ エンタープライズ モバイル トークン

インストール

bun add @capgo/capacitor-recaptcha bunx cap sync
npm, pnpm または yarn
  • npm install @capgo/capacitor-recaptcha
  • pnpm add @capgo/capacitor-recaptcha
  • yarn add @capgo/capacitor-recaptcha

ガイド

CapacitorでreCAPTCHAを使用する方法

デバイスでテスト

Download the Capgo app, then scan the QR code.

reCAPTCHA プラグインのプレビューQRcode

@capgo/capacitor-recaptchaを使用

Generate reCAPTCHA and reCAPTCHA Enterprise tokens from Web, Android, and iOS Capacitor apps.

インストール

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 Web実装では、標準のreCAPTCHA v3を代わりにreCAPTCHA Enterpriseを使用する場合にのみ使用してください。AndroidとiOSはGoogleのEnterprise/MobileSDKパスを使用し、拒否します。 enterprise: false.

トークンを生成

import { Recaptcha } from '@capgo/capacitor-recaptcha';

const { token } = await Recaptcha.execute({
  action: 'login',
});

トークンをバックエンドに送信し、受け入れる保護されたリクエストの前にreCAPTCHAの評価を作成します。

全体リファレンス

使用中の@capgo/capacitor-recaptchaから続けてください

あなたは 使用中の@capgo/capacitor-recaptcha 認証とアカウントフローの計画に使用している場合、@__CAPGO_KEEP_0__/__CAPGO_KEEP_1__-recaptchaと接続してください @capgo/capacitor-recaptchaの実装詳細については@capgo/capacitor-recaptchaを参照してください @capgo/capacitor-recaptchaの実装詳細について Getting Startedの実装詳細についてはGetting Startedを参照してください Full Reference @capgo/capacitor-ソーシャルログイン Capacitorで社会ログインを実装する方法については、@capgo/capacitor-social-loginのドキュメントを参照してください。 @capgo/capacitor-パスキー Capacitorでパスキーの実装方法については、@capgo/capacitor-passkeyのドキュメントを参照してください。 @capgo/capacitor-native-biometric Capacitorでバイオメトリックの実装方法については、@capgo/capacitor-native-biometricのドキュメントを参照してください。

FAQ

FAQ

Capacitor reCAPTCHA プラグインを Capacitor アプリにインストールする方法は何ですか。

Run "bun add @capgo/capacitor-recaptcha" (or "npm install @capgo/capacitor-recaptcha"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-recaptcha" in your app code.

Does @capgo/capacitor-recaptcha work with React, Vue and Angular?

Yes. reCAPTCHA is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-recaptcha support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-recaptcha free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-recaptcha/ and the package is free to install from npm. Bug reports and pull requests are welcome.

アップデート code が reCAPTCHA を使用している場合、アップル ストアのレビューなしでアップデートできますか。

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

reCAPTCHAの変更をアプリのレビューの待たずに配信する

プラグインがストアのビルドに追加されたら、Capgoのライブアップデートは、ユーザーにJavaScript、HTML、CSSの変更を数分で反映する

Capgoから始める