Skip to main content
@capgo/capacitor-autofill-save-password Auth & Security Open source

Autofill Save Password Capacitor plugin

Prompt users to save passwords to device autofill for seamless login experience

Install

bun add @capgo/capacitor-autofill-save-password bunx cap sync
npm, pnpm or yarn
  • npm install @capgo/capacitor-autofill-save-password
  • pnpm add @capgo/capacitor-autofill-save-password
  • yarn add @capgo/capacitor-autofill-save-password

Guide

How to use Autofill Save Password in Capacitor

Test on device

Download the Capgo app, then scan the QR code.

Autofill Save Password plugin preview QR code

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.

FAQ

Autofill Save Password plugin FAQ

How do I install the Autofill Save Password plugin in a Capacitor app?

Run "bun add @capgo/capacitor-autofill-save-password" (or "npm install @capgo/capacitor-autofill-save-password"), then run "bunx cap sync" so the iOS and Android projects pick up the native code. Import it from "@capgo/capacitor-autofill-save-password" in your app code.

Does @capgo/capacitor-autofill-save-password work with React, Vue and Angular?

Yes. Autofill Save Password is a Capacitor package, so it works with any web framework that runs inside Capacitor, including Ionic, React, Vue, Angular, Svelte and plain JavaScript.

Which Capacitor version does @capgo/capacitor-autofill-save-password support?

Capgo plugins follow Capacitor's major version: use the plugin major version that matches your Capacitor major version (for example plugin v8 with Capacitor 8). The compatibility table in the GitHub README lists the maintained versions.

Is @capgo/capacitor-autofill-save-password free and open source?

Yes. The source code is public on GitHub at https://github.com/Cap-go/capacitor-autofill-save-password/ and the package is free to install from npm. Bug reports and pull requests are welcome.

Can I update code that uses Autofill Save Password without an App Store review?

Installing or upgrading the plugin changes native code, so it needs a new store build. After that, JavaScript, HTML and CSS changes that call the plugin can ship instantly with Capgo live updates.

Ship Autofill Save Password changes without waiting for app review

Once the plugin is in your store build, Capgo live updates push your JavaScript, HTML and CSS changes to users in minutes.

Start with Capgo