Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

@capgo/capacitor-autofill-save-password

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@capgo/capacitor-autofill-save-password

Prompt to display dialog for saving password to keychain from webview app

latest
Source
npmnpm
Version
7.1.1
Version published
Maintainers
1
Created
Source

@capgo/capacitor-autofill-save-password

Prompt to display dialog for saving password to keychain from webview app

Capgo - Instant updates for capacitor

Fork of original plugin to work with Capacitor 7

IOS work for old versions and 18.3

Android still WIP

Install

npm install @capgo/capacitor-autofill-save-password
npx cap sync

Prerequisite

You must set up your app’s associated domains. To learn how to set up your app’s associated domains, see Supporting Associated Domains in Apple Developer document.

Then add in your App.entitlements

	<key>com.apple.developer.associated-domains</key>
	<array>
		<string>webcredentials:YOURDOMAIN</string>
	</array>

To associate your domain to your app.

How to use

import { Capacitor } from '@capacitor/core';
import { SavePassword } from '@capgo/capacitor-autofill-save-password';
    
login(username: string, password: string) {
    // your login logic here
        
        SavePassword.promptDialog({
            username: username,
            password: password,
        })
        .then(() => console.log('promptDialog success'))
        .catch((err) => console.error('promptDialog failure', err));
}

Android

Add apply plugin: 'com.google.gms.google-services' beneath apply plugin: 'com.android.application' in android/app/build.gradle

this will allow the plugin to import the proper lib.

Then you need to make sure you did set properly your domain and did add google-services.json.

guide here https://developer.android.com/identity/sign-in/credential-manager

You need to have the file at this path android/google-services.json set, if you dont use firebase add empty json

then add your domain in example-app/android/app/src/main/res/values/strings.xml

with

    <string name="asset_statements" translatable="false">
    [{
    \"include\": \"https://YOURDOMAIN/.well-known/assetlinks.json\"
    }]
    </string>

API

promptDialog(...)

promptDialog(options: Options) => Promise<void>

Save a password to the keychain.

ParamTypeDescription
optionsOptions- The options for the password.

readPassword()

readPassword() => Promise<ReadPasswordResult>

Read a password from the keychain. Requires the developer to setup associated domain for the app for iOS.

Returns: Promise<ReadPasswordResult>

Interfaces

Options

PropTypeDescription
usernamestringThe username to save.
passwordstringThe password to save.
urlstringThe url to save the password for. (For example: "web.capgo.app") iOS only.

ReadPasswordResult

PropTypeDescription
usernamestringThe username of the password.
passwordstringThe password of the password.

Keywords

capacitor

FAQs

Package last updated on 19 Jul 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts