electron-webauthn 0.0.12 → 0.0.13

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
@@ -15,6 +15,9 @@ This package provides JavaScript bindings to Apple's AuthenticationServices fram
15
15
  - 🔑 Support for cross-platform authenticators (external security keys)
16
16
  - đŸ“Ļ TypeScript first with complete type definitions
17
17
  - 🎨 Seamless integration with Electron's native window system
18
+ - 🔐 PRF (Pseudo-Random Function) support for credential assertions
19
+ - 💾 Large Blob support for storing credential-specific data
20
+ - âš™ī¸ User verification preference configuration (preferred, required, discouraged)
18
21
 
19
22
  ## Installation
20
23
 
@@ -49,8 +52,9 @@ async function authenticate() {
49
52
  const result = await getCredential(
50
53
  "example.com", // Relying Party ID
51
54
  Buffer.from("your-challenge"), // Challenge from server
52
- nativeWindowHandle, // Native window for UI presentation
53
- [] // Optional: allowed credential IDs
55
+ "https://example.com", // Origin
56
+ [], // Optional: allowed credential IDs
57
+ "preferred" // Optional: user verification preference
54
58
  );
55
59
 
56
60
  console.log(result);
@@ -61,12 +65,14 @@ async function authenticate() {
61
65
  // - authenticatorData: Authenticator data (Buffer)
62
66
  // - signature: Assertion signature (Buffer)
63
67
  // - userHandle: User handle (Buffer)
68
+ // - prf: [Buffer | null, Buffer | null] - PRF output (if supported)
69
+ // - largeBlob: Buffer | null - Large blob data (if supported)
64
70
  }
65
71
  ```
66
72
 
67
73
  ## API Reference
68
74
 
69
- ### `getCredential(rpid, challenge, nativeWindowHandle, allowedCredentialIds)`
75
+ ### `getCredential(rpid, challenge, origin, allowedCredentialIds, userVerificationPreference)`
70
76
 
71
77
  Performs a WebAuthn assertion (authentication) using available platform and cross-platform authenticators.
72
78
 
@@ -74,8 +80,12 @@ Performs a WebAuthn assertion (authentication) using available platform and cros
74
80
 
75
81
  - **`rpid: string`** - The Relying Party ID (typically your domain)
76
82
  - **`challenge: Buffer`** - The challenge from your server (32+ bytes recommended)
77
- - **`nativeWindowHandle: Buffer`** - The native window handle from Electron
83
+ - **`origin: string`** - The origin where the credential assertion will be used (e.g., "https://example.com")
78
84
  - **`allowedCredentialIds: Buffer[]`** - Optional array of credential IDs the user can use (empty = all registered credentials)
85
+ - **`userVerificationPreference?: UserVerificationPreference`** - Optional preference for user verification. Can be:
86
+ - `"preferred"` - User verification is preferred but not required (default)
87
+ - `"required"` - User verification is required
88
+ - `"discouraged"` - User verification should be discouraged
79
89
 
80
90
  #### Returns
81
91
 
@@ -91,49 +101,20 @@ interface GetCredentialResult {
91
101
  authenticatorData: Buffer; // Authenticator data from the device
92
102
  signature: Buffer; // Digital signature from the authenticator
93
103
  userHandle: Buffer; // User handle from the credential
104
+ prf: [Buffer | null, Buffer | null]; // PRF output (if supported by authenticator)
105
+ largeBlob: Buffer | null; // Large blob data (if supported by authenticator)
94
106
  }
95
107
  ```
96
108
 
97
- ## Architecture
98
-
99
- ### Package Structure
109
+ #### User Verification Preference Type
100
110
 
111
+ ```typescript
112
+ type UserVerificationPreference = "preferred" | "required" | "discouraged";
101
113
  ```
102
- src/
103
- ├── index.ts # Main export - getCredential function
104
- ├── helpers.ts # Utility functions
105
- ├── objc/
106
- │ ├── authentication-services/ # AuthenticationServices framework bindings
107
- │ │ ├── as-authorization-*.ts # Authorization request/response objects
108
- │ │ ├── enums/ # Enumeration values
109
- │ │ └── index.ts # Exports
110
- │ └── foundation/ # Foundation framework bindings
111
- │ ├── nsdata.ts # NSData (binary data) bindings
112
- │ ├── nsstring.ts # NSString bindings
113
- │ ├── nsarray.ts # NSArray bindings
114
- │ ├── nserror.ts # NSError bindings
115
- │ ├── nsview.ts # NSView bindings
116
- │ ├── nswindow.ts # NSWindow bindings
117
- │ └── index.ts # Exports
118
- └── test/ # Test utilities
119
- ├── index.ts # Test script
120
- ├── window.ts # Test window helpers
121
- └── example.ts # Example usage
122
- ```
123
-
124
- ### Dependencies
125
114
 
126
- - **objc-js** - Native Objective-C bindings for JavaScript
127
- - **TypeScript** - For type checking and compilation
128
-
129
- ## How It Works
115
+ ## Architecture
130
116
 
131
- 1. **Request Creation**: The library creates a `ASAuthorizationPlatformPublicKeyCredentialProvider` with your RP ID
132
- 2. **Request Configuration**: Sets up the challenge and optional allowed credentials list
133
- 3. **Controller Setup**: Creates an `ASAuthorizationController` to manage the authentication flow
134
- 4. **Delegation**: Registers delegates to handle success/error responses from the system
135
- 5. **Presentation**: Shows the native authentication UI in your window
136
- 6. **Result Processing**: Converts Objective-C objects to JavaScript Buffers and returns the assertion data
117
+ This library implements the WebAuthn standard using native APIs. Under the hood it handles all the complexity of macOS's authentication system, so you just call `getCredential()` with your challenge and get back the signed assertion.
137
118
 
138
119
  ## Usage Examples
139
120
 
@@ -155,7 +136,7 @@ app.on("ready", () => {
155
136
  // In your preload script or main process
156
137
  export async function authenticateUser(challenge: Buffer) {
157
138
  const nativeHandle = getPointer(mainWindow.getNativeWindowHandle());
158
- return getCredential("myapp.com", challenge, nativeHandle, []);
139
+ return getCredential("myapp.com", challenge, "https://myapp.com", []);
159
140
  }
160
141
  ```
161
142
 
@@ -166,11 +147,43 @@ export async function authenticateUser(challenge: Buffer) {
166
147
  const result = await getCredential(
167
148
  "myapp.com",
168
149
  challenge,
169
- nativeWindowHandle,
150
+ "https://myapp.com",
170
151
  [credentialId1, credentialId2] // User can only use these credentials
171
152
  );
172
153
  ```
173
154
 
155
+ ### With User Verification Requirement
156
+
157
+ ```typescript
158
+ // Require user verification (e.g., for sensitive operations)
159
+ const result = await getCredential(
160
+ "myapp.com",
161
+ challenge,
162
+ "https://myapp.com",
163
+ [], // No credential restrictions
164
+ "required" // Require user verification (biometric or PIN)
165
+ );
166
+ ```
167
+
168
+ ### Using PRF Output
169
+
170
+ ```typescript
171
+ // Get credential with PRF support
172
+ const result = await getCredential(
173
+ "myapp.com",
174
+ challenge,
175
+ "https://myapp.com",
176
+ []
177
+ );
178
+
179
+ // PRF output is available in the result
180
+ const [prfFirst, prfSecond] = result.prf;
181
+ if (prfFirst) {
182
+ // Use PRF output for additional cryptographic operations
183
+ console.log("PRF first output:", prfFirst);
184
+ }
185
+ ```
186
+
174
187
  ### Server-Side Verification
175
188
 
176
189
  After getting the assertion result, verify it on your server:
@@ -197,7 +210,7 @@ try {
197
210
  const result = await getCredential(
198
211
  "example.com",
199
212
  challenge,
200
- nativeWindowHandle,
213
+ "https://example.com",
201
214
  []
202
215
  );
203
216
  } catch (error) {
@@ -206,51 +219,25 @@ try {
206
219
  }
207
220
  ```
208
221
 
209
- ## Platform Support
210
-
211
- | Platform | Support |
212
- | --------- | ---------------- |
213
- | macOS 12+ | ✅ Full support |
214
- | Windows | ❌ Not supported |
215
- | Linux | ❌ Not supported |
216
- | iOS | ❌ Not supported |
217
-
218
- ## WebAuthn Spec Compliance
219
-
220
- This library implements the WebAuthn Level 2 specification for the assertion (authentication) operation:
221
-
222
- - ✅ Public Key Credential (assertions)
223
- - ✅ Platform authenticators (built-in)
224
- - ✅ Cross-platform authenticators (external)
225
- - ❌ Credential registration (create)
226
- - â„šī¸ See [WebAuthn Specification](https://www.w3.org/TR/webauthn-2/)
227
-
228
- ## Development
229
-
230
- ### Building
231
-
232
- ```bash
233
- bun run build
234
- ```
235
-
236
- This compiles TypeScript to JavaScript in the `dist/` directory.
222
+ **Supported:**
237
223
 
238
- ## Contributing
224
+ - ✅ WebAuthn assertions (authentication with existing credentials)
225
+ - ✅ Platform authenticators (Touch ID, Face ID)
226
+ - ✅ PRF (Pseudo-Random Function) output
227
+ - ✅ Large Blob support
239
228
 
240
- Contributions are welcome! Please ensure:
229
+ **Not Supported:**
241
230
 
242
- 1. Code is properly typed with TypeScript
243
- 2. New features include appropriate documentation
244
- 3. Tests pass with `bun run test`
245
- 4. Code builds successfully with `bun run build`
231
+ - ❌ Cross-platform authenticators (external security keys)
232
+ - ❌ Credential registration (attestation)
233
+ - ❌ Discoverable credentials
246
234
 
247
235
  ## License
248
236
 
249
237
  See [LICENSE](./LICENSE) file for details.
250
238
 
251
- ## Related Resources
239
+ ## Resources
252
240
 
253
241
  - [WebAuthn Specification](https://www.w3.org/TR/webauthn-2/)
254
- - [Apple AuthenticationServices Documentation](https://developer.apple.com/documentation/authenticationservices)
255
242
  - [Electron Documentation](https://www.electronjs.org/docs)
256
243
  - [objc-js Library](https://github.com/iamEvanYT/objc-js)
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8BA,KAAK,uBAAuB,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAC7D,MAAM,MAAM,0BAA0B,GAClC,WAAW,GACX,UAAU,GACV,aAAa,CAAC;AAElB,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,iBAAS,aAAa,CACpB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,MAAM,EAAE,EAC9B,0BAA0B,CAAC,EAAE,0BAA0B,GACtD,OAAO,CAAC,mBAAmB,CAAC,CA+I9B;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AA8BA,KAAK,uBAAuB,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAC7D,MAAM,MAAM,0BAA0B,GAClC,WAAW,GACX,UAAU,GACV,aAAa,CAAC;AAElB,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;IACnB,GAAG,EAAE,CAAC,MAAM,GAAG,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC,CAAC;IACpC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;CAC1B;AAED,iBAAS,aAAa,CACpB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,MAAM,EAAE,MAAM,EACd,oBAAoB,EAAE,MAAM,EAAE,EAC9B,0BAA0B,CAAC,EAAE,0BAA0B,GACtD,OAAO,CAAC,mBAAmB,CAAC,CA6I9B;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -34,7 +34,8 @@ function getCredential(rpid, challenge, nativeWindowHandle, origin, allowedCrede
34
34
  const requestsArray = NSArray.arrayWithObject$(platformKeyRequest);
35
35
  const authController = WebauthnGetController.alloc().initWithAuthorizationRequests$(requestsArray);
36
36
  // OLD: const authController = createAuthorizationController(requestsArray);
37
- // Generate the client data
37
+ // Generate our own client data instead of letting apple generate it
38
+ // This is because apple's client data lack the `crossOrigin` field, which is required by a lot of sites.
38
39
  const serializedOrigin = serializeOrigin(origin);
39
40
  const clientData = {
40
41
  type: "webauthn.get",
@@ -45,7 +46,6 @@ function getCredential(rpid, challenge, nativeWindowHandle, origin, allowedCrede
45
46
  const clientDataJSON = JSON.stringify(clientData);
46
47
  const clientDataBuffer = Buffer.from(clientDataJSON, "utf-8");
47
48
  const clientDataHash = clientDataJsonBufferToHash(clientDataBuffer);
48
- console.log("clientDataJSON", clientDataJSON);
49
49
  setClientDataHash(authController, clientDataHash);
50
50
  const finished = (_success) => {
51
51
  removeClientDataHash(authController);
@@ -60,7 +60,7 @@ function getCredential(rpid, challenge, nativeWindowHandle, origin, allowedCrede
60
60
  didCompleteWithAuthorization: (_, authorization) => {
61
61
  // Cast to _ASAuthorization to access typed methods
62
62
  const credential = authorization.credential();
63
- console.log("Authorization succeeded:", credential);
63
+ // console.log("Authorization succeeded:", credential);
64
64
  const id_data = credential.credentialID();
65
65
  const id = bufferFromNSDataDirect(id_data);
66
66
  let authenticatorAttachment = "platform";
@@ -71,7 +71,6 @@ function getCredential(rpid, challenge, nativeWindowHandle, origin, allowedCrede
71
71
  const prf = credential.prf();
72
72
  const prfFirst = prf?.first ? prf.first() : null;
73
73
  const prfSecond = prf?.second ? prf.second() : null;
74
- console.log("rawAuthenticatorData", credential.rawAuthenticatorData());
75
74
  resolve({
76
75
  id,
77
76
  authenticatorAttachment,
@@ -93,7 +92,7 @@ function getCredential(rpid, challenge, nativeWindowHandle, origin, allowedCrede
93
92
  // Parse the NSError into a readable format
94
93
  const parsedError = error;
95
94
  const errorMessage = parsedError.localizedDescription().UTF8String();
96
- console.error("Authorization failed:", errorMessage);
95
+ // console.error("Authorization failed:", errorMessage);
97
96
  reject(new Error(errorMessage));
98
97
  finished(false);
99
98
  },
@@ -110,7 +109,6 @@ function getCredential(rpid, challenge, nativeWindowHandle, origin, allowedCrede
110
109
  });
111
110
  authController.setPresentationContextProvider$(presentationContextProvider);
112
111
  // authController.performRequests()
113
- console.log("performing requests");
114
112
  authController.performRequests();
115
113
  return promise;
116
114
  }
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,qCAAqC,EAAE,MAAM,wEAAwE,CAAC;AAC/H,OAAO,EAAE,yBAAyB,EAAE,MAAM,+DAA+D,CAAC;AAC1G,OAAO,EAAE,iCAAiC,EAAE,MAAM,8FAA8F,CAAC;AACjJ,OAAO,EAAE,yCAAyC,EAAE,MAAM,4FAA4F,CAAC;AACvJ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YACjC,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC,CAAC;IACH,cAAc,CAAC,+BAA+B,CAAC,2BAA2B,CAAC,CAAC;IAE5E,mCAAmC;IACnC,cAAc,CAAC,eAAe,EAAE,CAAC;IAEjC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-webauthn",
3
- "version": "0.0.12",
3
+ "version": "0.0.13",
4
4
  "repository": "https://github.com/iamEvanYT/electron-webauthn",
5
5
  "description": "Add support for WebAuthn for Electron.",
6
6
  "main": "dist/index.js",