electron-webauthn 0.0.10 → 0.0.12

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 iamEvan
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,15 +1,256 @@
1
- # electron-webauthn-test
1
+ # electron-webauthn
2
2
 
3
- To install dependencies:
3
+ Add native WebAuthn/FIDO2 support to Electron using macOS AuthenticationServices framework.
4
+
5
+ ## Overview
6
+
7
+ `electron-webauthn` is a TypeScript library that bridges Electron with the native macOS AuthenticationServices framework, enabling WebAuthn/FIDO2 authentication directly through native platform authenticators (Touch ID, Face ID, hardware security keys, etc.).
8
+
9
+ This package provides JavaScript bindings to Apple's AuthenticationServices framework, allowing you to perform WebAuthn assertions (authentication/signing with existing credentials) in your Electron applications.
10
+
11
+ ## Features
12
+
13
+ - 🔐 Native WebAuthn support for Electron on macOS
14
+ - 🎯 Support for platform authenticators (Touch ID, Face ID)
15
+ - 🔑 Support for cross-platform authenticators (external security keys)
16
+ - 📦 TypeScript first with complete type definitions
17
+ - 🎨 Seamless integration with Electron's native window system
18
+
19
+ ## Installation
4
20
 
5
21
  ```bash
6
- bun install
22
+ npm install electron-webauthn
23
+ # or
24
+ bun add electron-webauthn
25
+ # or
26
+ yarn add electron-webauthn
7
27
  ```
8
28
 
9
- To run:
29
+ ### Requirements
30
+
31
+ - Electron 28+
32
+ - macOS 12.0+
33
+ - TypeScript 5+ (peer dependency)
34
+
35
+ ## Quick Start
36
+
37
+ ```typescript
38
+ import { getCredential } from "electron-webauthn";
39
+ import { getPointer } from "objc-js";
40
+
41
+ // In your Electron main process or preload script
42
+ async function authenticate() {
43
+ // Get the native window handle from your BrowserWindow
44
+ const nativeWindowHandle = getPointer(
45
+ yourElectronWindow.getNativeWindowHandle()
46
+ );
47
+
48
+ // Call getCredential to prompt the user for authentication
49
+ const result = await getCredential(
50
+ "example.com", // Relying Party ID
51
+ Buffer.from("your-challenge"), // Challenge from server
52
+ nativeWindowHandle, // Native window for UI presentation
53
+ [] // Optional: allowed credential IDs
54
+ );
55
+
56
+ console.log(result);
57
+ // Result contains:
58
+ // - id: Credential ID (Buffer)
59
+ // - authenticatorAttachment: 'platform' | 'cross-platform'
60
+ // - clientDataJSON: Raw client data (Buffer)
61
+ // - authenticatorData: Authenticator data (Buffer)
62
+ // - signature: Assertion signature (Buffer)
63
+ // - userHandle: User handle (Buffer)
64
+ }
65
+ ```
66
+
67
+ ## API Reference
68
+
69
+ ### `getCredential(rpid, challenge, nativeWindowHandle, allowedCredentialIds)`
70
+
71
+ Performs a WebAuthn assertion (authentication) using available platform and cross-platform authenticators.
72
+
73
+ #### Parameters
74
+
75
+ - **`rpid: string`** - The Relying Party ID (typically your domain)
76
+ - **`challenge: Buffer`** - The challenge from your server (32+ bytes recommended)
77
+ - **`nativeWindowHandle: Buffer`** - The native window handle from Electron
78
+ - **`allowedCredentialIds: Buffer[]`** - Optional array of credential IDs the user can use (empty = all registered credentials)
79
+
80
+ #### Returns
81
+
82
+ `Promise<GetCredentialResult>` - Resolves with the assertion result
83
+
84
+ #### Result Type
85
+
86
+ ```typescript
87
+ interface GetCredentialResult {
88
+ id: Buffer; // Credential ID
89
+ authenticatorAttachment: "platform" | "cross-platform"; // Type of authenticator used
90
+ clientDataJSON: Buffer; // Raw client data JSON (encoded as UTF-8 bytes)
91
+ authenticatorData: Buffer; // Authenticator data from the device
92
+ signature: Buffer; // Digital signature from the authenticator
93
+ userHandle: Buffer; // User handle from the credential
94
+ }
95
+ ```
96
+
97
+ ## Architecture
98
+
99
+ ### Package Structure
100
+
101
+ ```
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
+
126
+ - **objc-js** - Native Objective-C bindings for JavaScript
127
+ - **TypeScript** - For type checking and compilation
128
+
129
+ ## How It Works
130
+
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
137
+
138
+ ## Usage Examples
139
+
140
+ ### Basic Authentication
141
+
142
+ ```typescript
143
+ import { getCredential } from "electron-webauthn";
144
+ import { getPointer } from "objc-js";
145
+ import { app, BrowserWindow } from "electron";
146
+
147
+ let mainWindow: BrowserWindow;
148
+
149
+ app.on("ready", () => {
150
+ mainWindow = new BrowserWindow({
151
+ webPreferences: { preload: "./preload.js" },
152
+ });
153
+ });
154
+
155
+ // In your preload script or main process
156
+ export async function authenticateUser(challenge: Buffer) {
157
+ const nativeHandle = getPointer(mainWindow.getNativeWindowHandle());
158
+ return getCredential("myapp.com", challenge, nativeHandle, []);
159
+ }
160
+ ```
161
+
162
+ ### Restricting to Specific Credentials
163
+
164
+ ```typescript
165
+ // Only allow specific registered credentials
166
+ const result = await getCredential(
167
+ "myapp.com",
168
+ challenge,
169
+ nativeWindowHandle,
170
+ [credentialId1, credentialId2] // User can only use these credentials
171
+ );
172
+ ```
173
+
174
+ ### Server-Side Verification
175
+
176
+ After getting the assertion result, verify it on your server:
177
+
178
+ ```typescript
179
+ // Server-side (Node.js, Python, etc.)
180
+ // 1. Verify the signature using the public key from the credential registration
181
+ // 2. Check that the challenge matches what you sent
182
+ // 3. Verify the authenticator data flags
183
+ // 4. Check the user handle matches the authenticated user
184
+ ```
185
+
186
+ ## Error Handling
187
+
188
+ The `getCredential` promise will reject if:
189
+
190
+ - The user cancels the authentication prompt
191
+ - No valid credentials are available
192
+ - The authenticator fails
193
+ - The native window is invalid
194
+
195
+ ```typescript
196
+ try {
197
+ const result = await getCredential(
198
+ "example.com",
199
+ challenge,
200
+ nativeWindowHandle,
201
+ []
202
+ );
203
+ } catch (error) {
204
+ console.error("Authentication failed:", error.message);
205
+ // Handle error appropriately
206
+ }
207
+ ```
208
+
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
10
231
 
11
232
  ```bash
12
- bun run index.ts
233
+ bun run build
13
234
  ```
14
235
 
15
- This project was created using `bun init` in bun v1.3.5. [Bun](https://bun.com) is a fast all-in-one JavaScript runtime.
236
+ This compiles TypeScript to JavaScript in the `dist/` directory.
237
+
238
+ ## Contributing
239
+
240
+ Contributions are welcome! Please ensure:
241
+
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`
246
+
247
+ ## License
248
+
249
+ See [LICENSE](./LICENSE) file for details.
250
+
251
+ ## Related Resources
252
+
253
+ - [WebAuthn Specification](https://www.w3.org/TR/webauthn-2/)
254
+ - [Apple AuthenticationServices Documentation](https://developer.apple.com/documentation/authenticationservices)
255
+ - [Electron Documentation](https://www.electronjs.org/docs)
256
+ - [objc-js Library](https://github.com/iamEvanYT/objc-js)
@@ -0,0 +1,5 @@
1
+ import { NobjcObject } from "objc-js";
2
+ export declare function setClientDataHash(self: NobjcObject, clientDataHash: Buffer): void;
3
+ export declare function removeClientDataHash(self: NobjcObject): void;
4
+ export declare const WebauthnGetController: NobjcObject;
5
+ //# sourceMappingURL=get-authorization-controller.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"get-authorization-controller.d.ts","sourceRoot":"","sources":["../src/get-authorization-controller.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,WAAW,EAAc,MAAM,SAAS,CAAC;AAS9D,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,QAG1E;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,WAAW,QAGrD;AAED,eAAO,MAAM,qBAAqB,aAiChC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import { NobjcClass, NobjcObject, getPointer } from "objc-js";
2
+ import { NSDataFromBuffer } from "./objc/foundation/nsdata.js";
3
+ const getControllerState = new Map();
4
+ function getObjectPointerString(self) {
5
+ return getPointer(self).toBase64();
6
+ }
7
+ export function setClientDataHash(self, clientDataHash) {
8
+ const selfPointer = getObjectPointerString(self);
9
+ getControllerState.set(selfPointer, clientDataHash);
10
+ }
11
+ export function removeClientDataHash(self) {
12
+ const selfPointer = getObjectPointerString(self);
13
+ getControllerState.delete(selfPointer);
14
+ }
15
+ export const WebauthnGetController = NobjcClass.define({
16
+ name: "WebauthnGetController",
17
+ superclass: "ASAuthorizationController",
18
+ methods: {
19
+ // This overrides the default implementation of _requestContextWithRequests$error$ to allow us to set the clientDataHash on the assertion options
20
+ _requestContextWithRequests$error$: {
21
+ types: "@@:@^@",
22
+ implementation: (self, requests, outError) => {
23
+ const context = NobjcClass.super(self, "_requestContextWithRequests$error$", requests, outError);
24
+ // Grab the assertion options, set the client data hash, and set a copy of the assertion options back on the context
25
+ const selfPointer = getObjectPointerString(self);
26
+ if (getControllerState.has(selfPointer)) {
27
+ const assertionOptions = context.platformKeyCredentialAssertionOptions();
28
+ const clientDataHash = getControllerState.get(selfPointer);
29
+ assertionOptions.setClientDataHash$(NSDataFromBuffer(clientDataHash));
30
+ context.setPlatformKeyCredentialAssertionOptions$(assertionOptions.copyWithZone$(null));
31
+ }
32
+ return context;
33
+ },
34
+ },
35
+ },
36
+ });
37
+ //# sourceMappingURL=get-authorization-controller.js.map
@@ -0,0 +1 @@
1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,GACpB,OAAO,CAAC,qCAAqC,EAAE,CAAC;oBAElD,MAAM,cAAc,GAAG,kBAAkB,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;oBAC3D,gBAAgB,CAAC,kBAAkB,CAAC,gBAAgB,CAAC,cAAc,CAAC,CAAC,CAAC;oBAEtE,OAAO,CAAC,yCAAyC,CAC/C,gBAAgB,CAAC,aAAa,CAAC,IAAI,CAAC,CACrC,CAAC;gBACJ,CAAC;gBAED,OAAO,OAAO,CAAC;YACjB,CAAC;SACF;KACF;CACF,CAAC,CAAC"}
package/dist/helpers.d.ts CHANGED
@@ -17,4 +17,30 @@ export declare function PromiseWithResolvers<T = void>(): {
17
17
  resolve: (value: T | PromiseLike<T>) => void;
18
18
  reject: (reason?: unknown) => void;
19
19
  };
20
+ /**
21
+ * WebAuthn: clientDataHash = SHA-256(clientDataJSON_bytes)
22
+ *
23
+ * - Input must be the exact bytes of CollectedClientData JSON (UTF-8).
24
+ * - Output is 32-byte SHA-256 digest.
25
+ */
26
+ export declare function clientDataJsonBufferToHash(clientDataJSON: Buffer): Buffer;
27
+ /**
28
+ * Serializes an origin according to the HTML specification.
29
+ * Based on https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin
30
+ *
31
+ * @param origin - The origin string to serialize (e.g., "https://example.com:8080")
32
+ * @returns The serialized origin string, or "null" for opaque origins
33
+ *
34
+ * @example
35
+ * ```ts
36
+ * serializeOrigin("https://example.com:443"); // "https://example.com:443"
37
+ * serializeOrigin("http://localhost:8080"); // "http://localhost:8080"
38
+ * serializeOrigin("null"); // "null"
39
+ * ```
40
+ */
41
+ export declare function serializeOrigin(origin: string): string | null;
42
+ /**
43
+ * Convert an ArrayBuffer to a base64url string.
44
+ */
45
+ export declare function bufferToBase64Url(buffer: Buffer): string;
20
46
  //# sourceMappingURL=helpers.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,IAAI,KAAK;IAChD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAQA"}
1
+ {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;GAaG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,GAAG,IAAI,KAAK;IAChD,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,WAAW,CAAC,CAAC,CAAC,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACpC,CAQA;AAED;;;;;GAKG;AACH,wBAAgB,0BAA0B,CAAC,cAAc,EAAE,MAAM,GAAG,MAAM,CAWzE;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA+B7D;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAWxD"}
package/dist/helpers.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { createHash } from "crypto";
1
2
  /**
2
3
  * Creates a Promise along with its resolve and reject callbacks.
3
4
  * This is a polyfill for the native Promise.withResolvers() method.
@@ -21,4 +22,74 @@ export function PromiseWithResolvers() {
21
22
  });
22
23
  return { promise, resolve: resolve, reject: reject };
23
24
  }
25
+ /**
26
+ * WebAuthn: clientDataHash = SHA-256(clientDataJSON_bytes)
27
+ *
28
+ * - Input must be the exact bytes of CollectedClientData JSON (UTF-8).
29
+ * - Output is 32-byte SHA-256 digest.
30
+ */
31
+ export function clientDataJsonBufferToHash(clientDataJSON) {
32
+ if (!Buffer.isBuffer(clientDataJSON)) {
33
+ throw new TypeError("clientDataJsonBufferToHash: clientDataJSON must be a Buffer");
34
+ }
35
+ if (clientDataJSON.length === 0) {
36
+ throw new RangeError("clientDataJsonBufferToHash: clientDataJSON is empty");
37
+ }
38
+ return createHash("sha256").update(clientDataJSON).digest();
39
+ }
40
+ /**
41
+ * Serializes an origin according to the HTML specification.
42
+ * Based on https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin
43
+ *
44
+ * @param origin - The origin string to serialize (e.g., "https://example.com:8080")
45
+ * @returns The serialized origin string, or "null" for opaque origins
46
+ *
47
+ * @example
48
+ * ```ts
49
+ * serializeOrigin("https://example.com:443"); // "https://example.com:443"
50
+ * serializeOrigin("http://localhost:8080"); // "http://localhost:8080"
51
+ * serializeOrigin("null"); // "null"
52
+ * ```
53
+ */
54
+ export function serializeOrigin(origin) {
55
+ // If origin is an opaque origin (represented as "null"), return "null"
56
+ if (origin === "null" || !origin) {
57
+ return null;
58
+ }
59
+ try {
60
+ // Parse the origin using URL constructor
61
+ const url = new URL(origin);
62
+ // Build the serialized origin
63
+ let result = url.protocol; // Already includes "://"
64
+ // If protocol doesn't end with "://", ensure it's added
65
+ if (!result.endsWith("://")) {
66
+ result = result.replace(/:$/, "") + "://";
67
+ }
68
+ // Append the host (already serialized by URL)
69
+ result += url.hostname;
70
+ // If port is non-null and non-default, append it
71
+ if (url.port) {
72
+ result += ":" + url.port;
73
+ }
74
+ return result;
75
+ }
76
+ catch (error) {
77
+ // If URL parsing fails, treat as opaque origin
78
+ return null;
79
+ }
80
+ }
81
+ /**
82
+ * Convert an ArrayBuffer to a base64url string.
83
+ */
84
+ export function bufferToBase64Url(buffer) {
85
+ const bytes = new Uint8Array(buffer);
86
+ let binary = "";
87
+ for (let i = 0; i < bytes.length; i++) {
88
+ binary += String.fromCharCode(bytes[i]);
89
+ }
90
+ return btoa(binary)
91
+ .replace(/\+/g, "-")
92
+ .replace(/\//g, "_")
93
+ .replace(/=+$/, "");
94
+ }
24
95
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB;IAKlC,IAAI,OAA4C,CAAC;IACjD,IAAI,MAAkC,CAAC;IACvC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,GAAG,GAAG,CAAC;QACd,MAAM,GAAG,GAAG,CAAC;IACf,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAQ,EAAE,MAAM,EAAE,MAAO,EAAE,CAAC;AACzD,CAAC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAEpC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,oBAAoB;IAKlC,IAAI,OAA4C,CAAC;IACjD,IAAI,MAAkC,CAAC;IACvC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAI,CAAC,GAAG,EAAE,GAAG,EAAE,EAAE;QAC1C,OAAO,GAAG,GAAG,CAAC;QACd,MAAM,GAAG,GAAG,CAAC;IACf,CAAC,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAQ,EAAE,MAAM,EAAE,MAAO,EAAE,CAAC;AACzD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,0BAA0B,CAAC,cAAsB;IAC/D,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;QACrC,MAAM,IAAI,SAAS,CACjB,6DAA6D,CAC9D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I,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACtC,MAAM,IAAI,MAAM,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC1C,CAAC;IAED,OAAO,IAAI,CAAC,MAAM,CAAC;SAChB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,GAAG,CAAC;SACnB,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;AACxB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  type AuthenticatorAttachment = "platform" | "cross-platform";
2
+ export type UserVerificationPreference = "preferred" | "required" | "discouraged";
2
3
  export interface GetCredentialResult {
3
4
  id: Buffer;
4
5
  authenticatorAttachment: AuthenticatorAttachment;
@@ -6,7 +7,9 @@ export interface GetCredentialResult {
6
7
  authenticatorData: Buffer;
7
8
  signature: Buffer;
8
9
  userHandle: Buffer;
10
+ prf: [Buffer | null, Buffer | null];
11
+ largeBlob: Buffer | null;
9
12
  }
10
- declare function getCredential(rpid: string, challenge: Buffer, nativeWindowHandle: Buffer, allowedCredentialIds: Buffer[]): Promise<GetCredentialResult>;
13
+ declare function getCredential(rpid: string, challenge: Buffer, nativeWindowHandle: Buffer, origin: string, allowedCredentialIds: Buffer[], userVerificationPreference?: UserVerificationPreference): Promise<GetCredentialResult>;
11
14
  export { getCredential };
12
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAoBA,KAAK,uBAAuB,GAAG,UAAU,GAAG,gBAAgB,CAAC;AAE7D,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;CACpB;AAED,iBAAS,aAAa,CACpB,IAAI,EAAE,MAAM,EACZ,SAAS,EAAE,MAAM,EACjB,kBAAkB,EAAE,MAAM,EAC1B,oBAAoB,EAAE,MAAM,EAAE,GAC7B,OAAO,CAAC,mBAAmB,CAAC,CAwF9B;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,CA+I9B;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
package/dist/index.js CHANGED
@@ -1,15 +1,16 @@
1
1
  import { fromPointer } from "objc-js";
2
2
  import { createAuthorizationControllerDelegate } from "./objc/authentication-services/as-authorization-controller-delegate.js";
3
- import { createAuthorizationController } from "./objc/authentication-services/as-authorization-controller.js";
3
+ import { ASAuthorizationController } from "./objc/authentication-services/as-authorization-controller.js";
4
4
  import { createPresentationContextProvider } from "./objc/authentication-services/as-authorization-controller-presentation-context-providing.js";
5
5
  import { createPlatformPublicKeyCredentialProvider } from "./objc/authentication-services/as-authorization-platform-public-key-credential-provider.js";
6
6
  import { createPlatformPublicKeyCredentialDescriptor } from "./objc/authentication-services/as-authorization-platform-public-key-credential-descriptor.js";
7
7
  import { NSArray, NSArrayFromObjects } from "./objc/foundation/nsarray.js";
8
8
  import { bufferFromNSDataDirect, NSDataFromBuffer, } from "./objc/foundation/nsdata.js";
9
9
  import { NSStringFromString } from "./objc/foundation/nsstring.js";
10
- import { PromiseWithResolvers } from "./helpers.js";
10
+ import { bufferToBase64Url, clientDataJsonBufferToHash, PromiseWithResolvers, serializeOrigin, } from "./helpers.js";
11
11
  import { ASAuthorizationPublicKeyCredentialAttachment } from "./objc/authentication-services/enums/as-authorization-public-key-credential-attachment.js";
12
- function getCredential(rpid, challenge, nativeWindowHandle, allowedCredentialIds) {
12
+ import { removeClientDataHash, setClientDataHash, WebauthnGetController, } from "./get-authorization-controller.js";
13
+ function getCredential(rpid, challenge, nativeWindowHandle, origin, allowedCredentialIds, userVerificationPreference) {
13
14
  const { promise, resolve, reject } = PromiseWithResolvers();
14
15
  // Create NS objects
15
16
  const NS_rpID = NSStringFromString(rpid);
@@ -19,9 +20,36 @@ function getCredential(rpid, challenge, nativeWindowHandle, allowedCredentialIds
19
20
  const platformProvider = createPlatformPublicKeyCredentialProvider(NS_rpID);
20
21
  // let platformKeyRequest = platformProvider.createCredentialAssertionRequest(challenge: challenge)
21
22
  const platformKeyRequest = platformProvider.createCredentialAssertionRequestWithChallenge$(NS_challenge);
23
+ // platformKeyRequest.userVerificationPreference = ???
24
+ if (userVerificationPreference === "preferred") {
25
+ platformKeyRequest.setUserVerificationPreference$(NSStringFromString("preferred"));
26
+ }
27
+ else if (userVerificationPreference === "required") {
28
+ platformKeyRequest.setUserVerificationPreference$(NSStringFromString("required"));
29
+ }
30
+ else if (userVerificationPreference === "discouraged") {
31
+ platformKeyRequest.setUserVerificationPreference$(NSStringFromString("discouraged"));
32
+ }
22
33
  // let authController = ASAuthorizationController(authorizationRequests: [platformKeyRequest])
23
34
  const requestsArray = NSArray.arrayWithObject$(platformKeyRequest);
24
- const authController = createAuthorizationController(requestsArray);
35
+ const authController = WebauthnGetController.alloc().initWithAuthorizationRequests$(requestsArray);
36
+ // OLD: const authController = createAuthorizationController(requestsArray);
37
+ // Generate the client data
38
+ const serializedOrigin = serializeOrigin(origin);
39
+ const clientData = {
40
+ type: "webauthn.get",
41
+ challenge: bufferToBase64Url(challenge),
42
+ origin: serializedOrigin,
43
+ crossOrigin: false,
44
+ };
45
+ const clientDataJSON = JSON.stringify(clientData);
46
+ const clientDataBuffer = Buffer.from(clientDataJSON, "utf-8");
47
+ const clientDataHash = clientDataJsonBufferToHash(clientDataBuffer);
48
+ console.log("clientDataJSON", clientDataJSON);
49
+ setClientDataHash(authController, clientDataHash);
50
+ const finished = (_success) => {
51
+ removeClientDataHash(authController);
52
+ };
25
53
  // Set allowed credentials if provided
26
54
  if (allowedCredentialIds.length > 0) {
27
55
  const allowedCredentials = NSArrayFromObjects(allowedCredentialIds.map((id) => createPlatformPublicKeyCredentialDescriptor(NSDataFromBuffer(id))));
@@ -40,14 +68,26 @@ function getCredential(rpid, challenge, nativeWindowHandle, allowedCredentialIds
40
68
  ASAuthorizationPublicKeyCredentialAttachment.ASAuthorizationPublicKeyCredentialAttachmentCrossPlatform) {
41
69
  authenticatorAttachment = "cross-platform";
42
70
  }
71
+ const prf = credential.prf();
72
+ const prfFirst = prf?.first ? prf.first() : null;
73
+ const prfSecond = prf?.second ? prf.second() : null;
74
+ console.log("rawAuthenticatorData", credential.rawAuthenticatorData());
43
75
  resolve({
44
76
  id,
45
77
  authenticatorAttachment,
46
- clientDataJSON: bufferFromNSDataDirect(credential.rawClientDataJSON()),
78
+ clientDataJSON: clientDataBuffer, //bufferFromNSDataDirect(credential.rawClientDataJSON()),
47
79
  authenticatorData: bufferFromNSDataDirect(credential.rawAuthenticatorData()),
48
80
  signature: bufferFromNSDataDirect(credential.signature()),
49
81
  userHandle: bufferFromNSDataDirect(credential.userID()),
82
+ prf: [
83
+ prfFirst ? bufferFromNSDataDirect(prfFirst) : null,
84
+ prfSecond ? bufferFromNSDataDirect(prfSecond) : null,
85
+ ],
86
+ largeBlob: credential.largeBlob()
87
+ ? bufferFromNSDataDirect(credential.largeBlob().readData())
88
+ : null,
50
89
  });
90
+ finished(true);
51
91
  },
52
92
  didCompleteWithError: (_, error) => {
53
93
  // Parse the NSError into a readable format
@@ -55,6 +95,7 @@ function getCredential(rpid, challenge, nativeWindowHandle, allowedCredentialIds
55
95
  const errorMessage = parsedError.localizedDescription().UTF8String();
56
96
  console.error("Authorization failed:", errorMessage);
57
97
  reject(new Error(errorMessage));
98
+ finished(false);
58
99
  },
59
100
  });
60
101
  authController.setDelegate$(delegate);
@@ -69,6 +110,7 @@ function getCredential(rpid, challenge, nativeWindowHandle, allowedCredentialIds
69
110
  });
70
111
  authController.setPresentationContextProvider$(presentationContextProvider);
71
112
  // authController.performRequests()
113
+ console.log("performing requests");
72
114
  authController.performRequests();
73
115
  return promise;
74
116
  }
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,6BAA6B,EAAE,MAAM,+DAA+D,CAAC;AAC9G,OAAO,EAAE,iCAAiC,EAAE,MAAM,8FAA8F,CAAC;AACjJ,OAAO,EAAE,yCAAyC,EAAE,MAAM,4FAA4F,CAAC;AACvJ,OAAO,EAAE,2CAA2C,EAAE,MAAM,8FAA8F,CAAC;AAG3J,OAAO,EAAE,OAAO,EAAE,kBAAkB,EA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AM,YAAY,GAAG,WAAW,CAAC,oBAAoB,EAAE,CAAC,UAAU,EAAE,CAAC;YACrE,OAAO,CAAC,KAAK,CAAC,uBAAuB,EAAE,YAAY,CAAC,CAAC;YACrD,MAAM,CAAC,IAAI,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC;YAEhC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAClB,CAAC;KACF,CAAC,CAAC;IACH,cAAc,CAAC,YAAY,CAAC,QAAQ,CAAC,CAAC;IAEtC,oDAAoD;IACpD,MAAM,2BAA2B,GAAG,iCAAiC,CAAC;QACpE,4CAA4C,EAAE,GAAG,EAAE;YACjD,yDAAyD;YACzD,MAAM,MAAM,GAAG,WAAW,CAAC,kBAAkB,CAAuB,CAAC;YACrE,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC;YACjC,OAAO,QAAQ,CAAC;QAClB,CAAC;KACF,CAAC,CAAC;IACH,cAAc,CAAC,+BAA+B,CAAC,2BAA2B,CAAC,CAAC;IAE5E,mCAAmC;IACnC,OAAO,CAAC,GAAG,CAAC,qBAAqB,CAAC,CAAC;IACnC,cAAc,CAAC,eAAe,EAAE,CAAC;IAEjC,OAAO,OAAO,CAAC;AACjB,CAAC;AAED,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=example.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.d.ts","sourceRoot":"","sources":["../../src/test/example.ts"],"names":[],"mappings":""}
@@ -0,0 +1,24 @@
1
+ import { NSData } from "../objc/foundation/nsdata.js";
2
+ import { NSString } from "../objc/foundation/nsstring.js";
3
+ import { NSArray } from "../objc/foundation/nsarray.js";
4
+ const myString = NSString.stringWithUTF8String$("Hello from Objective-C!");
5
+ console.log("Created NSString:", myString);
6
+ const buf = Buffer.from("Hello from Objective-C!");
7
+ const myData = NSData.dataWithBytes$length$(buf, buf.length);
8
+ console.log("Created NSData:", myData);
9
+ // Test NSArray
10
+ const str1 = NSString.stringWithUTF8String$("First");
11
+ const str2 = NSString.stringWithUTF8String$("Second");
12
+ const str3 = NSString.stringWithUTF8String$("Third");
13
+ // Create array with one object, then add more
14
+ let myArray = NSArray.arrayWithObject$(str1);
15
+ myArray = myArray.arrayByAddingObject$(str2);
16
+ myArray = myArray.arrayByAddingObject$(str3);
17
+ console.log("Created NSArray with count:", myArray.count());
18
+ // Access elements
19
+ for (let i = 0; i < myArray.count(); i++) {
20
+ const obj = myArray.objectAtIndex$(i);
21
+ const nsString = obj;
22
+ console.log(`Array[${i}]:`, nsString.UTF8String());
23
+ }
24
+ //# sourceMappingURL=example.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"example.js","sourceRoot":"","sources":["../../src/test/example.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,8BAA8B,CAAC;AACtD,OAAO,EAAE,QAAQ,EAAE,MAAM,gCAAgC,CAAC;AAC1D,OAAO,EAAE,OAAO,EAAE,MAAM,+BAA+B,CAAC;AAExD,MAAM,QAAQ,GAAG,QAAQ,CAAC,qBAAqB,CAAC,yBAAyB,CAAC,CAAC;AAC3E,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,QAAQ,CAAC,CAAC;AAE3C,MAAM,GAAG,GAAG,MAAM,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAC;AACnD,MAAM,MAAM,GAAG,MAAM,CAAC,qBAAqB,CAAC,GAAG,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;AAC7D,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAC;AAEvC,eAAe;AACf,MAAM,IAAI,GAAG,QAAQ,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACrD,MAAM,IAAI,GAAG,QAAQ,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC;AACtD,MAAM,IAAI,GAAG,QAAQ,CAAC,qBAAqB,CAAC,OAAO,CAAC,CAAC;AAErD,8CAA8C;AAC9C,IAAI,OAAO,GAAG,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;AAC7C,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;AAC7C,OAAO,GAAG,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;AAE7C,OAAO,CAAC,GAAG,CAAC,6BAA6B,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC,CAAC;AAE5D,kBAAkB;AAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC;IACzC,MAAM,GAAG,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC,CAAQ,CAAC;IAC7C,MAAM,QAAQ,GAAG,GAAkB,CAAC;IACpC,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;AACrD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { getPointer } from "objc-js";
2
+ import { createEmptyWindow, getNativeWindowHandle } from "./window.js";
3
+ import { getCredential } from "../index.js";
4
+ const window = createEmptyWindow();
5
+ const nsView = getNativeWindowHandle(window);
6
+ const nsViewPointer = getPointer(nsView);
7
+ const result = getCredential("example.com", Buffer.from("challenge"), nsViewPointer, "https://example.com", []);
8
+ console.log("Result:", result);
9
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,MAAM,MAAM,GAAG,iBAAiB,EAAE,CAAC;AACnC,MAAM,MAAM,GAAG,qBAAqB,CAAC,MAAM,CAAC,CAAC;AAC7C,MAAM,aAAa,GAAG,UAAU,CAAC,MAAM,CAAC,CAAC;AAEzC,MAAM,MAAM,GAAG,aAAa,CAC1B,aAAa,EACb,MAAM,CAAC,IAAI,CAAC,WAAW,CAAC,EACxB,aAAa,EACb,qBAAqB,EACrB,EAAE,CACH,CAAC;AACF,OAAO,CAAC,GAAG,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type NobjcObject } from "objc-js";
2
+ declare function createEmptyWindow(): NobjcObject;
3
+ declare function getNativeWindowHandle(window: NobjcObject): NobjcObject;
4
+ export { createEmptyWindow, getNativeWindowHandle };
5
+ //# sourceMappingURL=window.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window.d.ts","sourceRoot":"","sources":["../../src/test/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAA+B,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAWxE,iBAAS,iBAAiB,IAAI,WAAW,CAmDxC;AAED,iBAAS,qBAAqB,CAAC,MAAM,EAAE,WAAW,GAAG,WAAW,CAG/D;AAED,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { NobjcLibrary, NobjcProtocol } from "objc-js";
2
+ import { allocInitPlain } from "../objc/helpers.js";
3
+ import { NSStringFromString } from "../objc/foundation/nsstring.js";
4
+ const AppKit = new NobjcLibrary("/System/Library/Frameworks/AppKit.framework/AppKit");
5
+ const Foundation = new NobjcLibrary("/System/Library/Frameworks/Foundation.framework/Foundation");
6
+ function createEmptyWindow() {
7
+ const NSApp = AppKit.NSApplication.sharedApplication();
8
+ const window = allocInitPlain(AppKit.NSWindow);
9
+ const styleMask = (1 << 0) | (1 << 1) | (1 << 2) | (1 << 3); // titled, closable, miniaturizable, resizable
10
+ // Make the app active and show the window.
11
+ window.setStyleMask$(styleMask);
12
+ window.setFrameFromString$(NSStringFromString("{{100, 100}, {800, 600}}"));
13
+ NSApp.setActivationPolicy$(0);
14
+ NSApp.finishLaunching();
15
+ NSApp.activateIgnoringOtherApps$(true);
16
+ window.setIsVisible$(true);
17
+ window.makeKeyWindow();
18
+ window.orderFrontRegardless();
19
+ const delegate = NobjcProtocol.implement("NSWindowDelegate", {
20
+ windowShouldClose$: () => {
21
+ NSApp.terminate$(NSApp);
22
+ return true;
23
+ },
24
+ windowWillClose$: () => {
25
+ NSApp.terminate$(NSApp);
26
+ },
27
+ });
28
+ window.setDelegate$(delegate);
29
+ const shutdown = () => {
30
+ try {
31
+ window.close();
32
+ }
33
+ finally {
34
+ NSApp.stop$(NSApp);
35
+ NSApp.terminate$(NSApp);
36
+ }
37
+ };
38
+ const handleSignal = () => shutdown();
39
+ process.once("exit", shutdown);
40
+ process.once("SIGINT", handleSignal);
41
+ process.once("SIGTERM", handleSignal);
42
+ process.once("SIGQUIT", handleSignal);
43
+ // Pump the AppKit run loop for a short tick to keep JS responsive.
44
+ const runLoop = Foundation.NSRunLoop.currentRunLoop();
45
+ const pump = () => {
46
+ const untilDate = Foundation.NSDate.dateWithTimeIntervalSinceNow$(0.01);
47
+ runLoop.runUntilDate$(untilDate);
48
+ };
49
+ const pumpId = setInterval(pump, 10);
50
+ process.once("exit", () => clearInterval(pumpId));
51
+ return window;
52
+ }
53
+ function getNativeWindowHandle(window) {
54
+ // Electron expects an NSView* on macOS; contentView returns that NSView.
55
+ return window.contentView();
56
+ }
57
+ export { createEmptyWindow, getNativeWindowHandle };
58
+ //# sourceMappingURL=window.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"window.js","sourceRoot":"","sources":["../../src/test/window.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,aAAa,EA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iBAAiB,EAAE,qBAAqB,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "electron-webauthn",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "repository": "https://github.com/iamEvanYT/electron-webauthn",
5
5
  "description": "Add support for WebAuthn for Electron.",
6
6
  "main": "dist/index.js",
@@ -28,7 +28,7 @@
28
28
  "typescript": "^5"
29
29
  },
30
30
  "dependencies": {
31
- "objc-js": "^0.0.13"
31
+ "objc-js": "^0.0.14"
32
32
  },
33
33
  "trustedDependencies": [
34
34
  "objc-js"