Using @capgo/capacitor-autofill-save-password
Prompt to display dialog for saving password to keychain from webview app.
Install
bun add @capgo/capacitor-autofill-save-password
bunx cap sync
bunx cap sync copies the plugin's native code into your native projects. Run it again after every plugin upgrade.
Import
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
API at a glance
| Method | Description |
|---|---|
promptDialog |
Save a password to the keychain. |
readPassword |
Read a password from the keychain. Requires the developer to setup associated domain for the app for iOS. |
Examples
promptDialog()
Save a password to the keychain.
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
await SavePassword.promptDialog({
username: 'your-username',
password: 'your-password'
});
readPassword()
Read a password from the keychain. Requires the developer to setup associated domain for the app for iOS.
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
const result = await SavePassword.readPassword();
// The result holds sensitive values: use it without logging it.
Full reference
Keep going from Using @capgo/capacitor-autofill-save-password
If you are using Using @capgo/capacitor-autofill-save-password to plan authentication and account flows, connect it with @capgo/capacitor-autofill-save-password for the implementation detail in @capgo/capacitor-autofill-save-password, Getting Started for the implementation detail in Getting Started, @capgo/capacitor-social-login for the implementation detail in @capgo/capacitor-social-login, @capgo/capacitor-passkey for the implementation detail in @capgo/capacitor-passkey, and @capgo/capacitor-native-biometric for the implementation detail in @capgo/capacitor-native-biometric.