@capgo/capacitor-autofill-save-password 8.1.3 → 8.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -1,14 +1,30 @@
|
|
|
1
1
|
# @capgo/capacitor-autofill-save-password
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Show the native save password prompt after login in your Capacitor app, so credentials land in the user's password manager, such as iCloud Keychain or Google Password Manager. Users sign in faster next time with autofill.
|
|
4
4
|
|
|
5
|
-
<a href="https://capgo.app
|
|
5
|
+
<a href="https://capgo.app/?ref=plugin_autofill_save_password"><img src="https://capgo.app/readme-banner.svg?repo=Cap-go/capacitor-autofill-save-password" alt="Capgo - Instant updates for Capacitor" /></a>
|
|
6
6
|
|
|
7
7
|
<div align="center">
|
|
8
|
-
<
|
|
9
|
-
<h2><a href="https://capgo.app/
|
|
8
|
+
<p><b>Capgo</b>: open-source live updates for Ionic and Capacitor apps. Ship OTA fixes and features instantly, without waiting for app store review.</p>
|
|
9
|
+
<h2><a href="https://capgo.app/register/?ref=plugin_autofill_save_password">➡️ Get started for free</a></h2>
|
|
10
|
+
<p>14-day unlimited free trial. No credit card required</p>
|
|
11
|
+
<p><a href="https://capgo.app/consulting/?ref=plugin_autofill_save_password">Missing a feature? We'll build the plugin for you 💪</a></p>
|
|
10
12
|
</div>
|
|
11
13
|
|
|
14
|
+
<p align="center">
|
|
15
|
+
<img src="https://raw.githubusercontent.com/Cap-go/capacitor-autofill-save-password/main/assets/github-social-preview.png" alt="@capgo/capacitor-autofill-save-password for Capacitor apps" width="300" />
|
|
16
|
+
</p>
|
|
17
|
+
|
|
18
|
+
## Key features
|
|
19
|
+
|
|
20
|
+
- **Save prompt**: `promptDialog()` asks the OS to save the username and password.
|
|
21
|
+
- **Read back**: `readPassword()` lets the user pick a saved password for your app.
|
|
22
|
+
- **iOS**: uses AuthenticationServices. On iOS 26.2 and later the credential goes to the user's chosen credential provider through `ASCredentialDataManager`.
|
|
23
|
+
- **Android**: uses the AndroidX Credential Manager.
|
|
24
|
+
- **Platforms**: iOS and Android. Not available on web.
|
|
25
|
+
|
|
26
|
+
Prompt to display dialog for saving password to keychain from webview app
|
|
27
|
+
|
|
12
28
|
Fork of original plugin to work with Capacitor 7+
|
|
13
29
|
|
|
14
30
|
## Documentation
|
|
@@ -104,11 +120,11 @@ with
|
|
|
104
120
|
|
|
105
121
|
### iOS
|
|
106
122
|
|
|
107
|
-
On iOS 26.2 and later, `promptDialog` saves through [`ASCredentialDataManager`](https://developer.apple.com/documentation/authenticationservices/ascredentialdatamanager), which routes the save to whichever credential provider the user has chosen
|
|
123
|
+
On iOS 26.2 and later, `promptDialog` saves through [`ASCredentialDataManager`](https://developer.apple.com/documentation/authenticationservices/ascredentialdatamanager), which routes the save to whichever credential provider the user has chosen, iCloud Keychain or a third-party manager. Below 26.2 it falls back to `SecAddSharedWebCredential`, which Apple deprecated in 26.2 and which only ever writes to iCloud Keychain.
|
|
108
124
|
|
|
109
125
|
Either way the `url` option names the domain the credential is saved against, and it must be one of the `webcredentials:` associated domains you set up above.
|
|
110
126
|
|
|
111
|
-
Note the two paths differ in what they report back. `SecAddSharedWebCredential` surfaces a dismissed prompt as an error, so `promptDialog` rejects. `ASCredentialDataManager` only throws when the system rejects the update
|
|
127
|
+
Note the two paths differ in what they report back. `SecAddSharedWebCredential` surfaces a dismissed prompt as an error, so `promptDialog` rejects. `ASCredentialDataManager` only throws when the system rejects the update, Apple describe it as equivalent to submitting a password form, so the user's choice never reaches the app. On 26.2 and later, treat a resolved promise as "the system accepted the request", not as confirmation that the password was saved.
|
|
112
128
|
|
|
113
129
|
On 26.2 and later you can also pass `title` to control the name the credential is filed under. Without it the password manager falls back to the bare domain, so users see `app.example.com` rather than your product name. The old API has no equivalent, so `title` is ignored below 26.2.
|
|
114
130
|
|
|
@@ -28,7 +28,7 @@ import java.util.Map;
|
|
|
28
28
|
@CapacitorPlugin(name = "SavePassword")
|
|
29
29
|
public class SavePasswordPlugin extends Plugin {
|
|
30
30
|
|
|
31
|
-
private final String pluginVersion = "8.1.
|
|
31
|
+
private final String pluginVersion = "8.1.5";
|
|
32
32
|
private static final String TAG = "CredentialManager";
|
|
33
33
|
private CredentialManager credentialManager;
|
|
34
34
|
private Map<String, PendingGetCredentialRequest> pendingRequestsByElementId = new HashMap<>();
|
|
@@ -9,7 +9,7 @@ import AuthenticationServices
|
|
|
9
9
|
*/
|
|
10
10
|
@objc(SavePasswordPlugin)
|
|
11
11
|
public class SavePasswordPlugin: CAPPlugin, CAPBridgedPlugin, ASAuthorizationControllerDelegate, ASAuthorizationControllerPresentationContextProviding {
|
|
12
|
-
private let pluginVersion: String = "8.1.
|
|
12
|
+
private let pluginVersion: String = "8.1.5"
|
|
13
13
|
public let identifier = "SavePasswordPlugin"
|
|
14
14
|
|
|
15
15
|
public let jsName = "SavePassword"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capgo/capacitor-autofill-save-password",
|
|
3
|
-
"version": "8.1.
|
|
3
|
+
"version": "8.1.5",
|
|
4
4
|
"description": "Prompt to display dialog for saving password to keychain from webview app",
|
|
5
5
|
"main": "dist/plugin.cjs.js",
|
|
6
6
|
"module": "dist/esm/index.js",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"verify:web": "npm run build",
|
|
43
43
|
"lint": "npm run eslint && npm run prettier -- --check && npm run swiftlint -- lint",
|
|
44
44
|
"fmt": "npm run eslint -- --fix && npm run prettier -- --write && npm run swiftlint -- --fix --format",
|
|
45
|
-
"eslint": "eslint .
|
|
45
|
+
"eslint": "eslint .",
|
|
46
46
|
"prettier": "prettier-pretty-check \"**/*.{css,html,ts,js,java}\" --plugin=prettier-plugin-java",
|
|
47
47
|
"swiftlint": "node-swiftlint",
|
|
48
48
|
"docgen": "docgen --api SavePasswordPlugin --output-readme README.md --output-json dist/docs.json",
|
|
@@ -61,11 +61,13 @@
|
|
|
61
61
|
"@capacitor/core": "^8.0.0",
|
|
62
62
|
"@capacitor/docgen": "^0.3.1",
|
|
63
63
|
"@capacitor/ios": "^8.0.0",
|
|
64
|
-
"@ionic/eslint-config": "^0.
|
|
64
|
+
"@ionic/eslint-config": "^0.5.0",
|
|
65
65
|
"@ionic/prettier-config": "^4.0.0",
|
|
66
66
|
"@ionic/swiftlint-config": "^2.0.0",
|
|
67
67
|
"@types/node": "^24.10.1",
|
|
68
|
-
"eslint": "^8.
|
|
68
|
+
"@typescript-eslint/eslint-plugin": "^8.70.0",
|
|
69
|
+
"@typescript-eslint/parser": "^8.70.0",
|
|
70
|
+
"eslint": "^10.0.0",
|
|
69
71
|
"eslint-plugin-import": "^2.31.0",
|
|
70
72
|
"prettier": "^3.6.2",
|
|
71
73
|
"prettier-plugin-java": "^2.7.7",
|
|
@@ -80,9 +82,6 @@
|
|
|
80
82
|
},
|
|
81
83
|
"prettier": "@ionic/prettier-config",
|
|
82
84
|
"swiftlint": "@ionic/swiftlint-config",
|
|
83
|
-
"eslintConfig": {
|
|
84
|
-
"extends": "@ionic/eslint-config/recommended"
|
|
85
|
-
},
|
|
86
85
|
"capacitor": {
|
|
87
86
|
"ios": {
|
|
88
87
|
"src": "ios"
|