跳过内容

Getting Started

终端窗口
bun add @capgo/capacitor-autofill-save-password
bunx cap sync
import { SavePassword } from '@capgo/capacitor-autofill-save-password';

将密码保存到钥匙串中。

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 来规划身份验证和帐户流程,连接它与 使用@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中,和 两因素身份验证 关于两步验证的实现细节。