跳过内容

开始使用

安装

安装
终端窗口
bun add @capgo/capacitor-autofill-save-password
bunx cap sync

导入

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

API概述

API概述

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();
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发生变化时,请重新同步。