スタートガイド
インストール手順と、このプラグインの完全なMarkdownガイドを含むセットアッププロンプトをコピーします。
Set up this Capacitor plugin in the project.
Use the package manager already used by the project.
Install these package(s): `@capgo/capacitor-autofill-save-password`
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/autofill-save-password/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アシストによるセットアップでプラグインをインストールできます。以下のコマンドを使用して、お使いのAIツールに Capgo のスキルを追加してください:
npx skills add https://github.com/Cap-go/capgo-skills --skill capacitor-plugins次に、以下のプロンプトを使用します:
Use the `capacitor-plugins` skill from `Cap-go/capgo-skills` to install the `@capgo/capacitor-autofill-save-password` plugin in my project.手動セットアップを希望する場合は、以下のコマンドを実行してプラグインをインストールし、下記のプラットフォーム別の手順に従ってください:
bun add @capgo/capacitor-autofill-save-passwordbunx cap syncインポート
「インポート」セクションimport { SavePassword } from '@capgo/capacitor-autofill-save-password';クイックスタート
「クイックスタート」セクションログイン成功後、OSのオートフィル機能で後から利用できる資格情報の保存をユーザーに提案します。
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
await SavePassword.promptDialog({ username: email, password,});例:保存されたパスワードの読み取り
「例:保存されたパスワードの読み取り」セクションconst { username, password } = await SavePassword.readPassword();よくある落とし穴
「よくある落とし穴」セクション- 呼び出しのタイミング: ユーザーの認証が成功した後にのみ prompt を表示し、キー入力のたびに実行しないようにします。
- Web: ブラウザのパスワードマネージャーを使用してください。このプラグインはネイティブ環境専用です。
- iOS 認証プロバイダー: iOS 26.2以降の挙動は、ユーザーが選択したパスワードマネージャーに従います。
API の概要
「API 概要」セクションpromptDialog
「promptDialog」セクションパスワードをキーチェーンに保存します。
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
await SavePassword.promptDialog({ username: 'your-username', password: 'your-password'});readPassword
「readPassword」セクションキーチェーンからパスワードを読み取ります。iOSでは、開発者がアプリに関連ドメインを設定する必要があります。
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
const result = await SavePassword.readPassword();// The result holds sensitive values: use it without logging it.型リファレンス
「型リファレンス」セクションOptions
「Options」セクションexport interface Options { /** * The username to save. */ username: string; /** * The password to save. */ password: string; /** * The url to save the password for. (For example: "console.capgo.app") * iOS only. */ url?: string;}ReadPasswordResult
「ReadPasswordResult」セクションexport interface ReadPasswordResult { /** * The username of the password. */ username: string; /** * The password of the password. */ password: string;}Source of Truth
「Source Of Truth」セクションこのページはプラグインの src/definitions.tsから生成されています。upstream で公開 API が変更されたら、再度 sync を実行してください。
Getting Startedの続きを進める
「Getting Started からの続き」セクション使用している場合 スタートガイド 認証とアカウントフローを計画するには、これを次と連携させてください @capgo/capacitor-autofill-save-password の使用方法 @capgo/capacitor-autofill-save-password を使用してネイティブ機能を利用する場合: @capgo/capacitor-social-login @capgo/capacitor-social-login の実装の詳細については、 @capgo/capacitor-passkey @capgo/capacitor-passkey の実装詳細については、 @capgo/capacitor-native-biometric @capgo/capacitor-native-biometric の実装の詳細、および 2要素認証 二要素認証の実装の詳細については。