跳过内容

开始

GitHub

您可以使用我们的 AI 助手来安装插件。将 Capgo 技能添加到您的 AI 工具中,使用以下命令:

终端窗口
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-password
bunx cap sync

导入

导入
import { SavePassword } from '@capgo/capacitor-autofill-save-password';

promptDialog

提示对话框

将密码保存到钥匙串。

import { SavePassword } from '@capgo/capacitor-autofill-save-password';
await SavePassword.promptDialog({
username: 'your-username',
password: 'your-password'
});

从钥匙串中读取密码。需要开发者为 iOS 应用设置关联域名。

import { SavePassword } from '@capgo/capacitor-autofill-save-password';
await SavePassword.readPassword();

类型参考

类型参考

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

读取密码结果
export interface ReadPasswordResult {
/**
* The username of the password.
*/
username: string;
/**
* The password of the password.
*/
password: string;
}

真实来源

真实来源

本页面由插件生成 src/definitions.ts重新同步时,公共的API发生了上游的变化。

继续从Getting Started

标题:继续从Getting Started

如果您正在使用 Getting Started 来规划身份验证和帐户流程,连接它到 使用@capgo/capacitor-autofill-save-password 为native能力在使用@capgo/capacitor-autofill-save-password中 @capgo/capacitor-social-login 为实现细节在@capgo/capacitor-social-login中 @capgo/capacitor-passkey 为实现细节在@capgo/capacitor-passkey中 @capgo/capacitor-native-生物识别 为了了解 @capgo/capacitor-native-生物识别 的实现细节 双因素认证 为了了解双因素认证的实现细节