Skip to content

Commit b379a71

Browse files
authored
Merge pull request #6 from Choochmeque/windows-data-support
Windows data support
2 parents 317f2b2 + 4a8fa68 commit b379a71

File tree

7 files changed

+526
-58
lines changed

7 files changed

+526
-58
lines changed

.github/workflows/checks.yml

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
- run: cargo fmt --all -- --check
1414

1515
prettier:
16-
name: Prettier
16+
name: prettier
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
@@ -40,7 +40,7 @@ jobs:
4040

4141
# Check links in the documentation.
4242
deadlinks:
43-
name: Deadlinks
43+
name: cargo-deadlinks
4444
runs-on: ubuntu-latest
4545
steps:
4646
- uses: awalsh128/cache-apt-pkgs-action@latest
@@ -56,39 +56,28 @@ jobs:
5656

5757
# Check links in markdown files.
5858
mlc:
59-
name: MLC
59+
name: mlc
6060
runs-on: ubuntu-latest
6161
steps:
6262
- uses: actions/checkout@v4
63-
- uses: becheran/mlc@v0.14.3
63+
- uses: becheran/mlc@v1
6464

6565
# Spellcheck.
6666
spellcheck:
6767
runs-on: ubuntu-latest
6868
steps:
6969
- uses: actions/checkout@v4
70-
- uses: streetsidesoftware/cspell-action@v1.0.1
70+
- uses: streetsidesoftware/cspell-action@v7
7171
with:
7272
files: "**/*.{rs,md}"
7373

74-
# Markdown formatting.
75-
markdown:
76-
name: Markdown lints
77-
runs-on: ubuntu-latest
78-
steps:
79-
- uses: actions/checkout@v4
80-
- uses: nosborn/github-action-markdown-cli@v3.5.0
81-
with:
82-
files: .
83-
ignore_path: .markdownlintignore
84-
8574
# cargo-deny.
8675
deny:
8776
name: cargo-deny
8877
runs-on: ubuntu-latest
8978
steps:
9079
- uses: actions/checkout@v4
91-
- uses: EmbarkStudios/cargo-deny-action@v1
80+
- uses: EmbarkStudios/cargo-deny-action@v2
9281

9382
# cargo-semver.
9483
semver:

.markdownlintignore

Lines changed: 0 additions & 3 deletions
This file was deleted.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ objc2-core-foundation = "0.3"
2727
block2 = "0.5"
2828

2929
[target.'cfg(target_os = "windows")'.dependencies]
30-
windows = { version = "0.58", features = ["Foundation", "Security_Credentials_UI", "Win32_Foundation", "Win32_UI_WindowsAndMessaging"] }
30+
windows = { version = "0.58", features = ["Foundation", "Storage_Streams", "Security_Credentials_UI", "Security_Cryptography_Core", "Win32_Foundation", "Win32_UI_WindowsAndMessaging"] }
3131

3232
[build-dependencies]
3333
tauri-plugin = { version = "2.4.0", features = ["build"] }

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ A Tauri plugin for biometric authentication (Touch ID, Face ID, Windows Hello, f
1111
- 🔐 Biometric authentication (Touch ID, Face ID, Windows Hello, fingerprint)
1212
- 📱 Full support for iOS and Android
1313
- 🖥️ Desktop support for macOS (Touch ID) and Windows (Windows Hello)
14-
- 🔑 Secure data storage with biometric protection (Android/iOS/macOS only)
14+
- 🔑 Secure data storage with biometric protection (Android/iOS/macOS/Windows)
1515
- 🎛️ Fallback to device passcode/password
1616
- 🛡️ Native security best practices
1717
- ⚡ Proper error handling with detailed error codes
@@ -116,7 +116,7 @@ try {
116116
}
117117
```
118118

119-
### Store Secure Data (macOS/iOS only)
119+
### Store Secure Data
120120

121121
```typescript
122122
import { setData, getData, hasData, removeData } from '@choochmeque/tauri-plugin-biometry-api';
@@ -151,8 +151,6 @@ await removeData({
151151
});
152152
```
153153

154-
**Note:** Data storage methods are not supported on Windows and will return a `notSupported` error.
155-
156154
## API Reference
157155

158156
### Types
@@ -234,7 +232,9 @@ Removes secure data.
234232
### Windows
235233

236234
- Supports Windows Hello (fingerprint, face, PIN)
237-
- Authentication only (data storage methods return "not supported" error)
235+
- Full secure data storage using Windows Hello credentials
236+
- Data is encrypted using AES-256 with Windows Hello protected keys
237+
- **Note:** `setData` will prompt for Windows Hello authentication when storing data
238238
- Automatically focuses Windows Hello dialog
239239
- Returns `BiometryType.Auto` as it uses Windows Hello's automatic selection
240240

@@ -261,10 +261,10 @@ Common error codes returned by the plugin:
261261

262262
## Security Considerations
263263

264-
- All secure data is stored in the system keychain (macOS/iOS) or Android Keystore
264+
- All secure data is stored in the system keychain (macOS/iOS), Android Keystore, or Windows Credential Manager
265265
- Data is encrypted and can only be accessed after successful biometric authentication
266266
- The plugin follows platform-specific security best practices
267-
- Windows currently supports authentication only, not secure data storage
267+
- Windows uses AES-256 encryption with keys derived from Windows Hello credentials
268268
- **macOS Code Signing:** Your app must be properly code-signed to use keychain storage on macOS. Development builds may work with ad-hoc signing, but production apps require valid Developer ID or App Store signing
269269
- Consider implementing additional application-level encryption for highly sensitive data
270270

cspell.json

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"version": "0.2",
3+
"$schema": "https://raw.githubusercontent.com/streetsidesoftware/cspell/main/cspell.schema.json",
4+
"enableGlobDot": true,
5+
"words": [
6+
"camelcase",
7+
"codecov",
8+
"cosmiconfig",
9+
"coverallsapp",
10+
"EDITMSG",
11+
"lcov",
12+
"octokit",
13+
"openapi",
14+
"pollyjs",
15+
"repos",
16+
"shrinkwrap",
17+
"streetsidesoftware",
18+
"tauri",
19+
"rustc",
20+
"xctoolchain",
21+
"rpath",
22+
"Xswiftc",
23+
"objc",
24+
"PCWSTR",
25+
"HSTRING",
26+
"HRESULT",
27+
"Pkcs"
28+
],
29+
"useGitignore": true,
30+
"ignorePaths": [
31+
".git/*",
32+
".git/!{COMMIT_EDITMSG,EDITMSG}",
33+
".git/*/**",
34+
".yarn",
35+
".pnp.js",
36+
".vscode",
37+
".gitignore",
38+
"action/lib/**",
39+
"coverage",
40+
"cspell.json",
41+
"__snapshots__",
42+
"__recordings__",
43+
"**/coverage/**",
44+
"**/fixtures/**/*.json",
45+
"**/fixtures/sampleCode/*errors/",
46+
"node_modules",
47+
"main_root.js",
48+
"package-lock.json",
49+
"pnpm-lock.yaml",
50+
"yarn.lock"
51+
]
52+
}

deny.toml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[graph]
2+
targets = [
3+
"x86_64-unknown-linux-gnu",
4+
"aarch64-unknown-linux-gnu",
5+
"x86_64-unknown-linux-musl",
6+
"aarch64-apple-darwin",
7+
"x86_64-apple-darwin",
8+
"x86_64-pc-windows-msvc",
9+
]
10+
all-features = true
11+
12+
[advisories]
13+
unmaintained = "workspace"
14+
ignore = [
15+
"atk-sys",
16+
"fxhash",
17+
"gdk",
18+
"gdk-sys",
19+
"gdkwayland-sys",
20+
"gdkx11",
21+
"proc-macro-error",
22+
"RUSTSEC-2024-0429",
23+
]
24+
25+
[sources]
26+
unknown-registry = "deny"
27+
unknown-git = "deny"
28+
29+
[licenses]
30+
confidence-threshold = 0.93
31+
allow = [
32+
"Apache-2.0",
33+
"Apache-2.0 WITH LLVM-exception",
34+
"MIT",
35+
"MPL-2.0",
36+
"BSD-3-Clause",
37+
"ISC",
38+
"Unicode-3.0",
39+
"Zlib",
40+
]

0 commit comments

Comments
 (0)