@capgo/capacitor-passkey 8.2.1 → 8.2.3

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
@@ -55,8 +55,9 @@ bun add @capgo/capacitor-passkey
55
55
  ## Browser-Like Setup
56
56
 
57
57
  1. Configure the plugin once in `capacitor.config.ts` or `capacitor.config.json`.
58
- 2. Import the `/auto` entrypoint once during app bootstrap.
59
- 3. Keep your existing browser `navigator.credentials.create/get` code unchanged.
58
+ 2. Import the plugin from the standard package entrypoint.
59
+ 3. Call `CapacitorPasskey.autoShimWebAuthn()` once during app bootstrap.
60
+ 4. Keep your existing browser `navigator.credentials.create/get` code unchanged.
60
61
 
61
62
  ### 1. Configure `capacitor.config.*`
62
63
 
@@ -85,7 +86,7 @@ Config keys:
85
86
 
86
87
  - `origin`: the primary HTTPS relying-party origin for the app.
87
88
  - `domains`: optional extra relying-party hostnames to wire natively during `cap sync/update`.
88
- - `autoShim`: defaults to `true`. The `/auto` entrypoint uses this flag.
89
+ - `autoShim`: defaults to `true`. This only controls the native `cap sync/update` auto-configuration hook.
89
90
 
90
91
  Then sync native projects:
91
92
 
@@ -100,17 +101,19 @@ During `cap sync` / `cap update`, the plugin automatically patches the generated
100
101
 
101
102
  You do not need to manually edit the host project files every time.
102
103
 
103
- ### 2. Import Once At Bootstrap
104
+ ### 2. Install The Shim During Bootstrap
104
105
 
105
106
  ```ts
106
- import '@capgo/capacitor-passkey/auto';
107
+ import { CapacitorPasskey } from '@capgo/capacitor-passkey';
108
+
109
+ await CapacitorPasskey.autoShimWebAuthn();
107
110
  ```
108
111
 
109
- That import reads `plugins.CapacitorPasskey` from the native Capacitor config and installs the WebAuthn shim automatically.
112
+ That call reads `plugins.CapacitorPasskey` from the native Capacitor config and installs the WebAuthn shim explicitly.
110
113
 
111
114
  ### 3. Keep Existing WebAuthn Calls
112
115
 
113
- After the bootstrap import, your browser-style code can stay the same:
116
+ After that bootstrap call, your browser-style code can stay the same:
114
117
 
115
118
  ```ts
116
119
  const registration = await navigator.credentials.create({
@@ -140,14 +143,6 @@ const authentication = await navigator.credentials.get({
140
143
  });
141
144
  ```
142
145
 
143
- If you do not want the side-effect import, call the config-driven installer manually once:
144
-
145
- ```ts
146
- import { CapacitorPasskey } from '@capgo/capacitor-passkey';
147
-
148
- await CapacitorPasskey.autoShimWebAuthn();
149
- ```
150
-
151
146
  ## What The Hook Configures
152
147
 
153
148
  The plugin hook only patches the native host app files that Capacitor generates.
@@ -253,7 +248,7 @@ This plugin preserves the front-end WebAuthn API shape, but native platforms are
253
248
 
254
249
  - On the web, the plugin forwards to the real browser WebAuthn API.
255
250
  - On native Capacitor, the shim returns browser-like credential objects backed by native APIs.
256
- - The `/auto` entrypoint is designed for “import once, keep browser code” setups.
251
+ - Call `CapacitorPasskey.autoShimWebAuthn()` once during bootstrap before using browser-style WebAuthn calls.
257
252
  - Conditional mediation currently returns `false`.
258
253
 
259
254
  ## Example App
@@ -261,7 +256,8 @@ This plugin preserves the front-end WebAuthn API shape, but native platforms are
261
256
  The `example-app/` folder demonstrates the auto-shim flow:
262
257
 
263
258
  - `example-app/capacitor.config.json` configures the plugin.
264
- - `example-app/src/main.js` imports `@capgo/capacitor-passkey/auto`.
259
+ - `example-app/src/main.js` imports `CapacitorPasskey` from `@capgo/capacitor-passkey`.
260
+ - `example-app/src/main.js` calls `CapacitorPasskey.autoShimWebAuthn()` during bootstrap.
265
261
  - The actual registration and authentication still go through `navigator.credentials.create/get`.
266
262
 
267
263
  ## API
@@ -285,9 +281,8 @@ The `example-app/` folder demonstrates the auto-shim flow:
285
281
 
286
282
  Capacitor Passkey plugin.
287
283
 
288
- Use `autoShimWebAuthn()` or import `@capgo/capacitor-passkey/auto`
289
- to keep existing `navigator.credentials.create/get` code working
290
- inside a Capacitor app.
284
+ Use `autoShimWebAuthn()` to keep existing `navigator.credentials.create/get`
285
+ code working inside a Capacitor app.
291
286
 
292
287
  ### shimWebAuthn(...)
293
288
 
@@ -338,7 +333,7 @@ Install the browser-style shim using host app configuration.
338
333
 
339
334
  This is the easiest way to keep existing browser WebAuthn code working:
340
335
  configure the plugin in `capacitor.config.*`, then call this once during
341
- app bootstrap or use the `/auto` entrypoint.
336
+ app bootstrap.
342
337
 
343
338
  | Param | Type |
344
339
  | ------------- | ------------------------------------------------------------------- |
@@ -446,8 +441,8 @@ This is the shape returned by `getConfiguration()`.
446
441
 
447
442
  | Prop | Type | Description |
448
443
  | -------------- | ---------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
449
- | **`autoShim`** | <code>boolean</code> | Whether the `/auto` entrypoint should install the shim automatically. Defaults to `true`. |
450
- | **`origin`** | <code>string</code> | Optional HTTPS origin used by the auto-shim. On iOS 17.4+ this origin is encoded into `clientDataJSON`. |
444
+ | **`autoShim`** | <code>boolean</code> | Whether the native `cap sync/update` hook should wire host projects automatically. Defaults to `true`. |
445
+ | **`origin`** | <code>string</code> | Optional HTTPS origin used by the config-driven shim install. On iOS 17.4+ this origin is encoded into `clientDataJSON`. |
451
446
  | **`domains`** | <code>string[]</code> | Domains associated with the app for passkey usage. These come from `domains` in Capacitor config plus the hostname derived from `origin` when available. |
452
447
  | **`platform`** | <code>'ios' \| 'android' \| 'web'</code> | Current runtime platform. |
453
448
 
package/dist/docs.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "api": {
3
3
  "name": "CapacitorPasskeyPlugin",
4
4
  "slug": "capacitorpasskeyplugin",
5
- "docs": "Capacitor Passkey plugin.\n\nUse `autoShimWebAuthn()` or import `@capgo/capacitor-passkey/auto`\nto keep existing `navigator.credentials.create/get` code working\ninside a Capacitor app.",
5
+ "docs": "Capacitor Passkey plugin.\n\nUse `autoShimWebAuthn()` to keep existing `navigator.credentials.create/get`\ncode working inside a Capacitor app.",
6
6
  "tags": [
7
7
  {
8
8
  "text": "1.0.0",
@@ -75,7 +75,7 @@
75
75
  "text": "```typescript\nimport { CapacitorPasskey } from '@capgo/capacitor-passkey';\n\nawait CapacitorPasskey.autoShimWebAuthn();\n```"
76
76
  }
77
77
  ],
78
- "docs": "Install the browser-style shim using host app configuration.\n\nThis is the easiest way to keep existing browser WebAuthn code working:\nconfigure the plugin in `capacitor.config.*`, then call this once during\napp bootstrap or use the `/auto` entrypoint.",
78
+ "docs": "Install the browser-style shim using host app configuration.\n\nThis is the easiest way to keep existing browser WebAuthn code working:\nconfigure the plugin in `capacitor.config.*`, then call this once during\napp bootstrap.",
79
79
  "complexTypes": [
80
80
  "PasskeyRuntimeConfiguration",
81
81
  "ShimWebAuthnOptions"
@@ -211,14 +211,14 @@
211
211
  {
212
212
  "name": "autoShim",
213
213
  "tags": [],
214
- "docs": "Whether the `/auto` entrypoint should install the shim automatically.\n\nDefaults to `true`.",
214
+ "docs": "Whether the native `cap sync/update` hook should wire host projects automatically.\n\nDefaults to `true`.",
215
215
  "complexTypes": [],
216
216
  "type": "boolean"
217
217
  },
218
218
  {
219
219
  "name": "origin",
220
220
  "tags": [],
221
- "docs": "Optional HTTPS origin used by the auto-shim.\n\nOn iOS 17.4+ this origin is encoded into `clientDataJSON`.",
221
+ "docs": "Optional HTTPS origin used by the config-driven shim install.\n\nOn iOS 17.4+ this origin is encoded into `clientDataJSON`.",
222
222
  "complexTypes": [],
223
223
  "type": "string | undefined"
224
224
  },
@@ -57,13 +57,13 @@ export interface ShimWebAuthnOptions {
57
57
  */
58
58
  export interface PasskeyRuntimeConfiguration {
59
59
  /**
60
- * Whether the `/auto` entrypoint should install the shim automatically.
60
+ * Whether the native `cap sync/update` hook should wire host projects automatically.
61
61
  *
62
62
  * Defaults to `true`.
63
63
  */
64
64
  autoShim: boolean;
65
65
  /**
66
- * Optional HTTPS origin used by the auto-shim.
66
+ * Optional HTTPS origin used by the config-driven shim install.
67
67
  *
68
68
  * On iOS 17.4+ this origin is encoded into `clientDataJSON`.
69
69
  */
@@ -448,9 +448,8 @@ export interface PasskeySupportResult {
448
448
  /**
449
449
  * Capacitor Passkey plugin.
450
450
  *
451
- * Use `autoShimWebAuthn()` or import `@capgo/capacitor-passkey/auto`
452
- * to keep existing `navigator.credentials.create/get` code working
453
- * inside a Capacitor app.
451
+ * Use `autoShimWebAuthn()` to keep existing `navigator.credentials.create/get`
452
+ * code working inside a Capacitor app.
454
453
  *
455
454
  * @since 1.0.0
456
455
  */
@@ -487,7 +486,7 @@ export interface CapacitorPasskeyPlugin {
487
486
  *
488
487
  * This is the easiest way to keep existing browser WebAuthn code working:
489
488
  * configure the plugin in `capacitor.config.*`, then call this once during
490
- * app bootstrap or use the `/auto` entrypoint.
489
+ * app bootstrap.
491
490
  *
492
491
  * @since 1.1.0
493
492
  * @example
@@ -1 +1 @@
1
- {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Supported authenticator attachment values.\n *\n * @since 1.0.0\n */\nexport type PasskeyAuthenticatorAttachment = 'platform' | 'cross-platform';\n\n/**\n * Supported WebAuthn credential type.\n *\n * @since 1.0.0\n */\nexport type PasskeyCredentialType = 'public-key';\n\n/**\n * Supported user verification preferences.\n *\n * @since 1.0.0\n */\nexport type PasskeyUserVerification = 'discouraged' | 'preferred' | 'required';\n\n/**\n * Supported attestation preferences.\n *\n * @since 1.0.0\n */\nexport type PasskeyAttestation = 'none' | 'indirect' | 'direct' | 'enterprise';\n\n/**\n * Supported resident key preferences.\n *\n * @since 1.0.0\n */\nexport type PasskeyResidentKey = 'discouraged' | 'preferred' | 'required';\n\n/**\n * Options used when installing the browser-style shim.\n *\n * @since 1.0.0\n */\nexport interface ShimWebAuthnOptions {\n /**\n * Optional HTTPS origin to encode into iOS 17.4+ clientDataJSON.\n *\n * Use this when your Capacitor app runs from `capacitor://localhost`\n * but your relying party expects `https://signin.example.com`.\n */\n origin?: string;\n\n /**\n * Force the shim even if the runtime already exposes `navigator.credentials`.\n *\n * Defaults to `false`.\n */\n force?: boolean;\n}\n\n/**\n * Runtime configuration loaded from the host app's Capacitor config.\n *\n * This is the shape returned by `getConfiguration()`.\n *\n * @since 1.1.0\n */\nexport interface PasskeyRuntimeConfiguration {\n /**\n * Whether the `/auto` entrypoint should install the shim automatically.\n *\n * Defaults to `true`.\n */\n autoShim: boolean;\n\n /**\n * Optional HTTPS origin used by the auto-shim.\n *\n * On iOS 17.4+ this origin is encoded into `clientDataJSON`.\n */\n origin?: string;\n\n /**\n * Domains associated with the app for passkey usage.\n *\n * These come from `domains` in Capacitor config plus the hostname derived\n * from `origin` when available.\n */\n domains: string[];\n\n /**\n * Current runtime platform.\n */\n platform: 'ios' | 'android' | 'web';\n}\n\n/**\n * JSON-safe representation of a public key credential descriptor.\n *\n * Binary identifiers must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyCredentialDescriptor {\n /**\n * Base64url-encoded credential identifier.\n */\n id: string;\n\n /**\n * Credential type. Only `public-key` is supported.\n */\n type?: PasskeyCredentialType;\n\n /**\n * Optional transport hints copied from WebAuthn.\n */\n transports?: string[];\n}\n\n/**\n * JSON-safe relying party information.\n *\n * @since 1.0.0\n */\nexport interface PasskeyRelyingParty {\n /**\n * Relying party identifier.\n *\n * If omitted, the shim derives it from the configured origin when possible.\n */\n id?: string;\n\n /**\n * Human-readable relying party name.\n */\n name: string;\n}\n\n/**\n * JSON-safe WebAuthn user entity.\n *\n * Binary identifiers must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyUserEntity {\n /**\n * Base64url-encoded user handle.\n */\n id: string;\n\n /**\n * User name shown by the authenticator.\n */\n name: string;\n\n /**\n * Optional display name shown by the authenticator.\n */\n displayName?: string;\n}\n\n/**\n * JSON-safe credential parameter entry.\n *\n * @since 1.0.0\n */\nexport interface PasskeyCredentialParameter {\n /**\n * Credential type. Only `public-key` is supported.\n */\n type: PasskeyCredentialType;\n\n /**\n * COSE algorithm identifier.\n */\n alg: number;\n}\n\n/**\n * JSON-safe authenticator selection options.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticatorSelection {\n /**\n * Optional authenticator attachment hint.\n */\n authenticatorAttachment?: PasskeyAuthenticatorAttachment;\n\n /**\n * Optional resident key preference.\n */\n residentKey?: PasskeyResidentKey;\n\n /**\n * Legacy resident key requirement flag.\n */\n requireResidentKey?: boolean;\n\n /**\n * Optional user verification preference.\n */\n userVerification?: PasskeyUserVerification;\n}\n\n/**\n * JSON-safe registration request options.\n *\n * All binary fields must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyPublicKeyCredentialCreationOptionsJSON {\n /**\n * Base64url-encoded challenge.\n */\n challenge: string;\n\n /**\n * Relying party information.\n */\n rp: PasskeyRelyingParty;\n\n /**\n * User information.\n */\n user: PasskeyUserEntity;\n\n /**\n * Supported credential algorithms.\n */\n pubKeyCredParams: PasskeyCredentialParameter[];\n\n /**\n * Optional timeout hint in milliseconds.\n */\n timeout?: number;\n\n /**\n * Optional credentials that must be excluded during registration.\n */\n excludeCredentials?: PasskeyCredentialDescriptor[];\n\n /**\n * Optional authenticator preferences.\n */\n authenticatorSelection?: PasskeyAuthenticatorSelection;\n\n /**\n * Optional attestation preference.\n */\n attestation?: PasskeyAttestation;\n\n /**\n * Optional hints copied from the JSON form used by modern WebAuthn toolkits.\n */\n hints?: string[];\n\n /**\n * Optional extensions copied as-is into the request JSON.\n */\n extensions?: Record<string, unknown>;\n}\n\n/**\n * Direct registration request for the plugin transport.\n *\n * @since 1.0.0\n */\nexport interface CreateCredentialOptions {\n /**\n * JSON-safe registration request.\n */\n publicKey: PasskeyPublicKeyCredentialCreationOptionsJSON;\n\n /**\n * Optional HTTPS origin to use for iOS 17.4+ browser-style clientDataJSON.\n */\n origin?: string;\n}\n\n/**\n * JSON-safe authentication request options.\n *\n * All binary fields must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyPublicKeyCredentialRequestOptionsJSON {\n /**\n * Base64url-encoded challenge.\n */\n challenge: string;\n\n /**\n * Optional timeout hint in milliseconds.\n */\n timeout?: number;\n\n /**\n * Optional relying party identifier.\n *\n * If omitted, the shim derives it from the configured origin when possible.\n */\n rpId?: string;\n\n /**\n * Optional allow list copied from WebAuthn.\n */\n allowCredentials?: PasskeyCredentialDescriptor[];\n\n /**\n * Optional user verification preference.\n */\n userVerification?: PasskeyUserVerification;\n\n /**\n * Optional hints copied from the JSON form used by modern WebAuthn toolkits.\n */\n hints?: string[];\n\n /**\n * Optional extensions copied as-is into the request JSON.\n */\n extensions?: Record<string, unknown>;\n}\n\n/**\n * Direct authentication request for the plugin transport.\n *\n * @since 1.0.0\n */\nexport interface GetCredentialOptions {\n /**\n * JSON-safe authentication request.\n */\n publicKey: PasskeyPublicKeyCredentialRequestOptionsJSON;\n\n /**\n * Optional mediation hint. `conditional` currently falls back to an explicit prompt.\n */\n mediation?: string;\n\n /**\n * Optional HTTPS origin to use for iOS 17.4+ browser-style clientDataJSON.\n */\n origin?: string;\n}\n\n/**\n * JSON-safe attestation response payload.\n *\n * All binary fields are base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticatorAttestationResponseJSON {\n /**\n * Base64url-encoded clientDataJSON.\n */\n clientDataJSON: string;\n\n /**\n * Base64url-encoded attestation object.\n */\n attestationObject: string;\n\n /**\n * Optional base64url-encoded public key when provided by the platform.\n */\n publicKey?: string;\n\n /**\n * Optional public key algorithm when provided by the platform.\n */\n publicKeyAlgorithm?: number;\n\n /**\n * Optional transport list when provided by the platform.\n */\n transports?: string[];\n}\n\n/**\n * JSON-safe assertion response payload.\n *\n * All binary fields are base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticatorAssertionResponseJSON {\n /**\n * Base64url-encoded clientDataJSON.\n */\n clientDataJSON: string;\n\n /**\n * Base64url-encoded authenticator data.\n */\n authenticatorData: string;\n\n /**\n * Base64url-encoded signature.\n */\n signature: string;\n\n /**\n * Optional base64url-encoded user handle.\n */\n userHandle?: string | null;\n}\n\n/**\n * JSON-safe registration credential returned by the plugin.\n *\n * @since 1.0.0\n */\nexport interface PasskeyRegistrationCredential {\n /**\n * Base64url-encoded credential identifier.\n */\n id: string;\n\n /**\n * Base64url-encoded raw credential identifier.\n */\n rawId: string;\n\n /**\n * Credential type. Always `public-key`.\n */\n type: PasskeyCredentialType;\n\n /**\n * Optional authenticator attachment reported by the platform.\n */\n authenticatorAttachment?: PasskeyAuthenticatorAttachment;\n\n /**\n * Client extension results returned by the platform.\n */\n clientExtensionResults: Record<string, unknown>;\n\n /**\n * Registration response payload.\n */\n response: PasskeyAuthenticatorAttestationResponseJSON;\n}\n\n/**\n * JSON-safe authentication credential returned by the plugin.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticationCredential {\n /**\n * Base64url-encoded credential identifier.\n */\n id: string;\n\n /**\n * Base64url-encoded raw credential identifier.\n */\n rawId: string;\n\n /**\n * Credential type. Always `public-key`.\n */\n type: PasskeyCredentialType;\n\n /**\n * Optional authenticator attachment reported by the platform.\n */\n authenticatorAttachment?: PasskeyAuthenticatorAttachment;\n\n /**\n * Client extension results returned by the platform.\n */\n clientExtensionResults: Record<string, unknown>;\n\n /**\n * Assertion response payload.\n */\n response: PasskeyAuthenticatorAssertionResponseJSON;\n}\n\n/**\n * Plugin version payload.\n *\n * @since 1.0.0\n */\nexport interface PluginVersionResult {\n /**\n * Version identifier reported by the current platform implementation.\n */\n version: string;\n}\n\n/**\n * Passkey support status for the current runtime.\n *\n * @since 1.0.0\n */\nexport interface PasskeySupportResult {\n /**\n * Whether passkeys are available on the current runtime.\n */\n available: boolean;\n\n /**\n * Whether conditional mediation is available.\n */\n conditionalMediation: boolean;\n\n /**\n * Current platform identifier.\n */\n platform: 'ios' | 'android' | 'web';\n}\n\n/**\n * Capacitor Passkey plugin.\n *\n * Use `autoShimWebAuthn()` or import `@capgo/capacitor-passkey/auto`\n * to keep existing `navigator.credentials.create/get` code working\n * inside a Capacitor app.\n *\n * @since 1.0.0\n */\nexport interface CapacitorPasskeyPlugin {\n /**\n * Install a browser-style WebAuthn shim on top of the native plugin.\n *\n * The shim patches `navigator.credentials.create/get` for `publicKey`\n * requests and returns browser-like credential objects.\n *\n * Use this when you want to override the auto-loaded config manually.\n *\n * @since 1.0.0\n * @example\n * ```typescript\n * import { CapacitorPasskey } from '@capgo/capacitor-passkey';\n *\n * CapacitorPasskey.shimWebAuthn({\n * origin: 'https://signin.example.com',\n * });\n * ```\n */\n shimWebAuthn(options?: ShimWebAuthnOptions): void;\n\n /**\n * Load plugin configuration from the host Capacitor app.\n *\n * This reads `plugins.CapacitorPasskey` from `capacitor.config.*`.\n *\n * @since 1.1.0\n */\n getConfiguration(): Promise<PasskeyRuntimeConfiguration>;\n\n /**\n * Install the browser-style shim using host app configuration.\n *\n * This is the easiest way to keep existing browser WebAuthn code working:\n * configure the plugin in `capacitor.config.*`, then call this once during\n * app bootstrap or use the `/auto` entrypoint.\n *\n * @since 1.1.0\n * @example\n * ```typescript\n * import { CapacitorPasskey } from '@capgo/capacitor-passkey';\n *\n * await CapacitorPasskey.autoShimWebAuthn();\n * ```\n */\n autoShimWebAuthn(options?: ShimWebAuthnOptions): Promise<PasskeyRuntimeConfiguration>;\n\n /**\n * Register a passkey from a JSON-safe WebAuthn request.\n *\n * This method is useful when your backend already returns the\n * `PublicKeyCredentialCreationOptionsJSON` form.\n *\n * @since 1.0.0\n */\n createCredential(options: CreateCredentialOptions): Promise<PasskeyRegistrationCredential>;\n\n /**\n * Authenticate with an existing passkey from a JSON-safe WebAuthn request.\n *\n * This method is useful when your backend already returns the\n * `PublicKeyCredentialRequestOptionsJSON` form.\n *\n * @since 1.0.0\n */\n getCredential(options: GetCredentialOptions): Promise<PasskeyAuthenticationCredential>;\n\n /**\n * Report whether passkeys are available in the current runtime.\n *\n * @since 1.0.0\n */\n isSupported(): Promise<PasskeySupportResult>;\n\n /**\n * Returns the current platform implementation version marker.\n *\n * @since 1.0.0\n */\n getPluginVersion(): Promise<PluginVersionResult>;\n}\n"]}
1
+ {"version":3,"file":"definitions.js","sourceRoot":"","sources":["../../src/definitions.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Supported authenticator attachment values.\n *\n * @since 1.0.0\n */\nexport type PasskeyAuthenticatorAttachment = 'platform' | 'cross-platform';\n\n/**\n * Supported WebAuthn credential type.\n *\n * @since 1.0.0\n */\nexport type PasskeyCredentialType = 'public-key';\n\n/**\n * Supported user verification preferences.\n *\n * @since 1.0.0\n */\nexport type PasskeyUserVerification = 'discouraged' | 'preferred' | 'required';\n\n/**\n * Supported attestation preferences.\n *\n * @since 1.0.0\n */\nexport type PasskeyAttestation = 'none' | 'indirect' | 'direct' | 'enterprise';\n\n/**\n * Supported resident key preferences.\n *\n * @since 1.0.0\n */\nexport type PasskeyResidentKey = 'discouraged' | 'preferred' | 'required';\n\n/**\n * Options used when installing the browser-style shim.\n *\n * @since 1.0.0\n */\nexport interface ShimWebAuthnOptions {\n /**\n * Optional HTTPS origin to encode into iOS 17.4+ clientDataJSON.\n *\n * Use this when your Capacitor app runs from `capacitor://localhost`\n * but your relying party expects `https://signin.example.com`.\n */\n origin?: string;\n\n /**\n * Force the shim even if the runtime already exposes `navigator.credentials`.\n *\n * Defaults to `false`.\n */\n force?: boolean;\n}\n\n/**\n * Runtime configuration loaded from the host app's Capacitor config.\n *\n * This is the shape returned by `getConfiguration()`.\n *\n * @since 1.1.0\n */\nexport interface PasskeyRuntimeConfiguration {\n /**\n * Whether the native `cap sync/update` hook should wire host projects automatically.\n *\n * Defaults to `true`.\n */\n autoShim: boolean;\n\n /**\n * Optional HTTPS origin used by the config-driven shim install.\n *\n * On iOS 17.4+ this origin is encoded into `clientDataJSON`.\n */\n origin?: string;\n\n /**\n * Domains associated with the app for passkey usage.\n *\n * These come from `domains` in Capacitor config plus the hostname derived\n * from `origin` when available.\n */\n domains: string[];\n\n /**\n * Current runtime platform.\n */\n platform: 'ios' | 'android' | 'web';\n}\n\n/**\n * JSON-safe representation of a public key credential descriptor.\n *\n * Binary identifiers must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyCredentialDescriptor {\n /**\n * Base64url-encoded credential identifier.\n */\n id: string;\n\n /**\n * Credential type. Only `public-key` is supported.\n */\n type?: PasskeyCredentialType;\n\n /**\n * Optional transport hints copied from WebAuthn.\n */\n transports?: string[];\n}\n\n/**\n * JSON-safe relying party information.\n *\n * @since 1.0.0\n */\nexport interface PasskeyRelyingParty {\n /**\n * Relying party identifier.\n *\n * If omitted, the shim derives it from the configured origin when possible.\n */\n id?: string;\n\n /**\n * Human-readable relying party name.\n */\n name: string;\n}\n\n/**\n * JSON-safe WebAuthn user entity.\n *\n * Binary identifiers must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyUserEntity {\n /**\n * Base64url-encoded user handle.\n */\n id: string;\n\n /**\n * User name shown by the authenticator.\n */\n name: string;\n\n /**\n * Optional display name shown by the authenticator.\n */\n displayName?: string;\n}\n\n/**\n * JSON-safe credential parameter entry.\n *\n * @since 1.0.0\n */\nexport interface PasskeyCredentialParameter {\n /**\n * Credential type. Only `public-key` is supported.\n */\n type: PasskeyCredentialType;\n\n /**\n * COSE algorithm identifier.\n */\n alg: number;\n}\n\n/**\n * JSON-safe authenticator selection options.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticatorSelection {\n /**\n * Optional authenticator attachment hint.\n */\n authenticatorAttachment?: PasskeyAuthenticatorAttachment;\n\n /**\n * Optional resident key preference.\n */\n residentKey?: PasskeyResidentKey;\n\n /**\n * Legacy resident key requirement flag.\n */\n requireResidentKey?: boolean;\n\n /**\n * Optional user verification preference.\n */\n userVerification?: PasskeyUserVerification;\n}\n\n/**\n * JSON-safe registration request options.\n *\n * All binary fields must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyPublicKeyCredentialCreationOptionsJSON {\n /**\n * Base64url-encoded challenge.\n */\n challenge: string;\n\n /**\n * Relying party information.\n */\n rp: PasskeyRelyingParty;\n\n /**\n * User information.\n */\n user: PasskeyUserEntity;\n\n /**\n * Supported credential algorithms.\n */\n pubKeyCredParams: PasskeyCredentialParameter[];\n\n /**\n * Optional timeout hint in milliseconds.\n */\n timeout?: number;\n\n /**\n * Optional credentials that must be excluded during registration.\n */\n excludeCredentials?: PasskeyCredentialDescriptor[];\n\n /**\n * Optional authenticator preferences.\n */\n authenticatorSelection?: PasskeyAuthenticatorSelection;\n\n /**\n * Optional attestation preference.\n */\n attestation?: PasskeyAttestation;\n\n /**\n * Optional hints copied from the JSON form used by modern WebAuthn toolkits.\n */\n hints?: string[];\n\n /**\n * Optional extensions copied as-is into the request JSON.\n */\n extensions?: Record<string, unknown>;\n}\n\n/**\n * Direct registration request for the plugin transport.\n *\n * @since 1.0.0\n */\nexport interface CreateCredentialOptions {\n /**\n * JSON-safe registration request.\n */\n publicKey: PasskeyPublicKeyCredentialCreationOptionsJSON;\n\n /**\n * Optional HTTPS origin to use for iOS 17.4+ browser-style clientDataJSON.\n */\n origin?: string;\n}\n\n/**\n * JSON-safe authentication request options.\n *\n * All binary fields must be base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyPublicKeyCredentialRequestOptionsJSON {\n /**\n * Base64url-encoded challenge.\n */\n challenge: string;\n\n /**\n * Optional timeout hint in milliseconds.\n */\n timeout?: number;\n\n /**\n * Optional relying party identifier.\n *\n * If omitted, the shim derives it from the configured origin when possible.\n */\n rpId?: string;\n\n /**\n * Optional allow list copied from WebAuthn.\n */\n allowCredentials?: PasskeyCredentialDescriptor[];\n\n /**\n * Optional user verification preference.\n */\n userVerification?: PasskeyUserVerification;\n\n /**\n * Optional hints copied from the JSON form used by modern WebAuthn toolkits.\n */\n hints?: string[];\n\n /**\n * Optional extensions copied as-is into the request JSON.\n */\n extensions?: Record<string, unknown>;\n}\n\n/**\n * Direct authentication request for the plugin transport.\n *\n * @since 1.0.0\n */\nexport interface GetCredentialOptions {\n /**\n * JSON-safe authentication request.\n */\n publicKey: PasskeyPublicKeyCredentialRequestOptionsJSON;\n\n /**\n * Optional mediation hint. `conditional` currently falls back to an explicit prompt.\n */\n mediation?: string;\n\n /**\n * Optional HTTPS origin to use for iOS 17.4+ browser-style clientDataJSON.\n */\n origin?: string;\n}\n\n/**\n * JSON-safe attestation response payload.\n *\n * All binary fields are base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticatorAttestationResponseJSON {\n /**\n * Base64url-encoded clientDataJSON.\n */\n clientDataJSON: string;\n\n /**\n * Base64url-encoded attestation object.\n */\n attestationObject: string;\n\n /**\n * Optional base64url-encoded public key when provided by the platform.\n */\n publicKey?: string;\n\n /**\n * Optional public key algorithm when provided by the platform.\n */\n publicKeyAlgorithm?: number;\n\n /**\n * Optional transport list when provided by the platform.\n */\n transports?: string[];\n}\n\n/**\n * JSON-safe assertion response payload.\n *\n * All binary fields are base64url encoded.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticatorAssertionResponseJSON {\n /**\n * Base64url-encoded clientDataJSON.\n */\n clientDataJSON: string;\n\n /**\n * Base64url-encoded authenticator data.\n */\n authenticatorData: string;\n\n /**\n * Base64url-encoded signature.\n */\n signature: string;\n\n /**\n * Optional base64url-encoded user handle.\n */\n userHandle?: string | null;\n}\n\n/**\n * JSON-safe registration credential returned by the plugin.\n *\n * @since 1.0.0\n */\nexport interface PasskeyRegistrationCredential {\n /**\n * Base64url-encoded credential identifier.\n */\n id: string;\n\n /**\n * Base64url-encoded raw credential identifier.\n */\n rawId: string;\n\n /**\n * Credential type. Always `public-key`.\n */\n type: PasskeyCredentialType;\n\n /**\n * Optional authenticator attachment reported by the platform.\n */\n authenticatorAttachment?: PasskeyAuthenticatorAttachment;\n\n /**\n * Client extension results returned by the platform.\n */\n clientExtensionResults: Record<string, unknown>;\n\n /**\n * Registration response payload.\n */\n response: PasskeyAuthenticatorAttestationResponseJSON;\n}\n\n/**\n * JSON-safe authentication credential returned by the plugin.\n *\n * @since 1.0.0\n */\nexport interface PasskeyAuthenticationCredential {\n /**\n * Base64url-encoded credential identifier.\n */\n id: string;\n\n /**\n * Base64url-encoded raw credential identifier.\n */\n rawId: string;\n\n /**\n * Credential type. Always `public-key`.\n */\n type: PasskeyCredentialType;\n\n /**\n * Optional authenticator attachment reported by the platform.\n */\n authenticatorAttachment?: PasskeyAuthenticatorAttachment;\n\n /**\n * Client extension results returned by the platform.\n */\n clientExtensionResults: Record<string, unknown>;\n\n /**\n * Assertion response payload.\n */\n response: PasskeyAuthenticatorAssertionResponseJSON;\n}\n\n/**\n * Plugin version payload.\n *\n * @since 1.0.0\n */\nexport interface PluginVersionResult {\n /**\n * Version identifier reported by the current platform implementation.\n */\n version: string;\n}\n\n/**\n * Passkey support status for the current runtime.\n *\n * @since 1.0.0\n */\nexport interface PasskeySupportResult {\n /**\n * Whether passkeys are available on the current runtime.\n */\n available: boolean;\n\n /**\n * Whether conditional mediation is available.\n */\n conditionalMediation: boolean;\n\n /**\n * Current platform identifier.\n */\n platform: 'ios' | 'android' | 'web';\n}\n\n/**\n * Capacitor Passkey plugin.\n *\n * Use `autoShimWebAuthn()` to keep existing `navigator.credentials.create/get`\n * code working inside a Capacitor app.\n *\n * @since 1.0.0\n */\nexport interface CapacitorPasskeyPlugin {\n /**\n * Install a browser-style WebAuthn shim on top of the native plugin.\n *\n * The shim patches `navigator.credentials.create/get` for `publicKey`\n * requests and returns browser-like credential objects.\n *\n * Use this when you want to override the auto-loaded config manually.\n *\n * @since 1.0.0\n * @example\n * ```typescript\n * import { CapacitorPasskey } from '@capgo/capacitor-passkey';\n *\n * CapacitorPasskey.shimWebAuthn({\n * origin: 'https://signin.example.com',\n * });\n * ```\n */\n shimWebAuthn(options?: ShimWebAuthnOptions): void;\n\n /**\n * Load plugin configuration from the host Capacitor app.\n *\n * This reads `plugins.CapacitorPasskey` from `capacitor.config.*`.\n *\n * @since 1.1.0\n */\n getConfiguration(): Promise<PasskeyRuntimeConfiguration>;\n\n /**\n * Install the browser-style shim using host app configuration.\n *\n * This is the easiest way to keep existing browser WebAuthn code working:\n * configure the plugin in `capacitor.config.*`, then call this once during\n * app bootstrap.\n *\n * @since 1.1.0\n * @example\n * ```typescript\n * import { CapacitorPasskey } from '@capgo/capacitor-passkey';\n *\n * await CapacitorPasskey.autoShimWebAuthn();\n * ```\n */\n autoShimWebAuthn(options?: ShimWebAuthnOptions): Promise<PasskeyRuntimeConfiguration>;\n\n /**\n * Register a passkey from a JSON-safe WebAuthn request.\n *\n * This method is useful when your backend already returns the\n * `PublicKeyCredentialCreationOptionsJSON` form.\n *\n * @since 1.0.0\n */\n createCredential(options: CreateCredentialOptions): Promise<PasskeyRegistrationCredential>;\n\n /**\n * Authenticate with an existing passkey from a JSON-safe WebAuthn request.\n *\n * This method is useful when your backend already returns the\n * `PublicKeyCredentialRequestOptionsJSON` form.\n *\n * @since 1.0.0\n */\n getCredential(options: GetCredentialOptions): Promise<PasskeyAuthenticationCredential>;\n\n /**\n * Report whether passkeys are available in the current runtime.\n *\n * @since 1.0.0\n */\n isSupported(): Promise<PasskeySupportResult>;\n\n /**\n * Returns the current platform implementation version marker.\n *\n * @since 1.0.0\n */\n getPluginVersion(): Promise<PluginVersionResult>;\n}\n"]}
package/dist/esm/index.js CHANGED
@@ -46,9 +46,6 @@ async function loadConfiguration() {
46
46
  const CapacitorPasskey = {
47
47
  async autoShimWebAuthn(options) {
48
48
  const configuration = await CapacitorPasskey.getConfiguration();
49
- if (!configuration.autoShim && !(options === null || options === void 0 ? void 0 : options.force)) {
50
- return configuration;
51
- }
52
49
  const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);
53
50
  cachedConfiguration = effectiveConfiguration;
54
51
  installWebAuthnShim({
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,sBAAsB,GAAG,cAAc,CAA+B,kBAAkB,EAAE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C;IACnD,CAAC;IACD,KAAK,CAAC,WAAW;QACf,OAAO,sBAAsB,CAAC,WAAW,EAAE,CAAC;IAC9C,CAAC;IACD,YAAY,CAAC,OAAO;QAClB,mBAAmB,CAAC;YAClB,OAAO,EAAE,gBAAgB,CAAC,mBAAmB,EAAE,OAAO,CAAC;YACvD,MAAM,EAAE,gBAAgB;SACzB,CAAC,CAAC;IACL,CAAC;CACF,CAAC;AAEF,cAAc,eAAe,CAAC;AAC9B,OAAO,EAAE,gBAAgB,EAAE,CAAC","sourcesContent":["import { registerPlugin } from '@capacitor/core';\n\nimport type { CapacitorPasskeyPlugin, PasskeyRuntimeConfiguration, ShimWebAuthnOptions } from './definitions';\nimport type { NativeCapacitorPasskeyPlugin } from './internal';\nimport { installWebAuthnShim } from './shim';\nimport { createNativeRequest } from './webauthn';\n\nconst NativeCapacitorPasskey = registerPlugin<NativeCapacitorPasskeyPlugin>('CapacitorPasskey', {\n web: () => import('./web').then((module) => new module.CapacitorPasskeyWeb()),\n});\n\nlet configurationPromise: Promise<PasskeyRuntimeConfiguration> | undefined;\nlet cachedConfiguration: PasskeyRuntimeConfiguration | undefined;\n\nfunction mergeShimOptions(\n configuration: PasskeyRuntimeConfiguration | undefined,\n options: ShimWebAuthnOptions | undefined,\n): ShimWebAuthnOptions | undefined {\n const origin = options?.origin ?? configuration?.origin;\n const force = options?.force;\n\n if (!origin && force === undefined) {\n return undefined;\n }\n\n return {\n force,\n origin,\n };\n}\n\nfunction mergeRuntimeConfiguration(\n configuration: PasskeyRuntimeConfiguration,\n options: ShimWebAuthnOptions | undefined,\n): PasskeyRuntimeConfiguration {\n const origin = options?.origin ?? configuration.origin;\n const domains = new Set(configuration.domains);\n\n if (origin) {\n try {\n domains.add(new URL(origin).hostname);\n } catch {\n // Ignore invalid override values here and let native APIs validate later.\n }\n }\n\n return {\n ...configuration,\n domains: [...domains],\n origin,\n };\n}\n\nasync function loadConfiguration(): Promise<PasskeyRuntimeConfiguration> {\n try {\n const configuration = await NativeCapacitorPasskey.getConfiguration();\n cachedConfiguration = configuration;\n return configuration;\n } catch (error) {\n configurationPromise = undefined;\n throw error;\n }\n}\n\nconst CapacitorPasskey: CapacitorPasskeyPlugin = {\n async autoShimWebAuthn(options) {\n const configuration = await CapacitorPasskey.getConfiguration();\n if (!configuration.autoShim && !options?.force) {\n return configuration;\n }\n\n const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);\n cachedConfiguration = effectiveConfiguration;\n\n installWebAuthnShim({\n options: mergeShimOptions(effectiveConfiguration, options),\n plugin: CapacitorPasskey,\n });\n\n return effectiveConfiguration;\n },\n async createCredential(options) {\n return NativeCapacitorPasskey.createCredential(createNativeRequest(options));\n },\n async getConfiguration() {\n if (!configurationPromise) {\n configurationPromise = loadConfiguration();\n }\n\n return configurationPromise;\n },\n async getCredential(options) {\n return NativeCapacitorPasskey.getCredential(createNativeRequest(options));\n },\n async getPluginVersion() {\n return NativeCapacitorPasskey.getPluginVersion();\n },\n async isSupported() {\n return NativeCapacitorPasskey.isSupported();\n },\n shimWebAuthn(options) {\n installWebAuthnShim({\n options: mergeShimOptions(cachedConfiguration, options),\n plugin: CapacitorPasskey,\n });\n },\n};\n\nexport * from './definitions';\nexport { CapacitorPasskey };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAIjD,OAAO,EAAE,mBAAmB,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEjD,MAAM,sBAAsB,GAAG,cAAc,CAA+B,kBAAkB,EAAE;IAC9F,GAAG,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,CAAC,mBAAmB,EAAE,CAAC;CAC9E,CAAC,CAAC;AAEH,IAAI,oBAAs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erPlugin } from '@capacitor/core';\n\nimport type { CapacitorPasskeyPlugin, PasskeyRuntimeConfiguration, ShimWebAuthnOptions } from './definitions';\nimport type { NativeCapacitorPasskeyPlugin } from './internal';\nimport { installWebAuthnShim } from './shim';\nimport { createNativeRequest } from './webauthn';\n\nconst NativeCapacitorPasskey = registerPlugin<NativeCapacitorPasskeyPlugin>('CapacitorPasskey', {\n web: () => import('./web').then((module) => new module.CapacitorPasskeyWeb()),\n});\n\nlet configurationPromise: Promise<PasskeyRuntimeConfiguration> | undefined;\nlet cachedConfiguration: PasskeyRuntimeConfiguration | undefined;\n\nfunction mergeShimOptions(\n configuration: PasskeyRuntimeConfiguration | undefined,\n options: ShimWebAuthnOptions | undefined,\n): ShimWebAuthnOptions | undefined {\n const origin = options?.origin ?? configuration?.origin;\n const force = options?.force;\n\n if (!origin && force === undefined) {\n return undefined;\n }\n\n return {\n force,\n origin,\n };\n}\n\nfunction mergeRuntimeConfiguration(\n configuration: PasskeyRuntimeConfiguration,\n options: ShimWebAuthnOptions | undefined,\n): PasskeyRuntimeConfiguration {\n const origin = options?.origin ?? configuration.origin;\n const domains = new Set(configuration.domains);\n\n if (origin) {\n try {\n domains.add(new URL(origin).hostname);\n } catch {\n // Ignore invalid override values here and let native APIs validate later.\n }\n }\n\n return {\n ...configuration,\n domains: [...domains],\n origin,\n };\n}\n\nasync function loadConfiguration(): Promise<PasskeyRuntimeConfiguration> {\n try {\n const configuration = await NativeCapacitorPasskey.getConfiguration();\n cachedConfiguration = configuration;\n return configuration;\n } catch (error) {\n configurationPromise = undefined;\n throw error;\n }\n}\n\nconst CapacitorPasskey: CapacitorPasskeyPlugin = {\n async autoShimWebAuthn(options) {\n const configuration = await CapacitorPasskey.getConfiguration();\n const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);\n cachedConfiguration = effectiveConfiguration;\n\n installWebAuthnShim({\n options: mergeShimOptions(effectiveConfiguration, options),\n plugin: CapacitorPasskey,\n });\n\n return effectiveConfiguration;\n },\n async createCredential(options) {\n return NativeCapacitorPasskey.createCredential(createNativeRequest(options));\n },\n async getConfiguration() {\n if (!configurationPromise) {\n configurationPromise = loadConfiguration();\n }\n\n return configurationPromise;\n },\n async getCredential(options) {\n return NativeCapacitorPasskey.getCredential(createNativeRequest(options));\n },\n async getPluginVersion() {\n return NativeCapacitorPasskey.getPluginVersion();\n },\n async isSupported() {\n return NativeCapacitorPasskey.isSupported();\n },\n shimWebAuthn(options) {\n installWebAuthnShim({\n options: mergeShimOptions(cachedConfiguration, options),\n plugin: CapacitorPasskey,\n });\n },\n};\n\nexport * from './definitions';\nexport { CapacitorPasskey };\n"]}
@@ -594,9 +594,6 @@ async function loadConfiguration() {
594
594
  const CapacitorPasskey = {
595
595
  async autoShimWebAuthn(options) {
596
596
  const configuration = await CapacitorPasskey.getConfiguration();
597
- if (!configuration.autoShim && !(options === null || options === void 0 ? void 0 : options.force)) {
598
- return configuration;
599
- }
600
597
  const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);
601
598
  cachedConfiguration = effectiveConfiguration;
602
599
  installWebAuthnShim({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.cjs.js","sources":["esm/webauthn.js","esm/shim.js","esm/index.js","esm/web.js"],"sourcesContent":["const PASSKEY_TYPE = 'public-key';\nexport function createNativeRequest(options) {\n if ('mediation' in options) {\n const getOptions = options;\n return {\n origin: resolveOrigin(getOptions.origin, getOptions.publicKey.rpId),\n requestJson: JSON.stringify(normalizeRequestOptionsJSON(getOptions.publicKey, getOptions.origin)),\n };\n }\n const createOptions = options;\n return {\n origin: resolveOrigin(createOptions.origin, createOptions.publicKey.rp.id),\n requestJson: JSON.stringify(normalizeCreationOptionsJSON(createOptions.publicKey, createOptions.origin)),\n };\n}\nexport function webAuthnCreationOptionsToJSON(options, origin) {\n var _a;\n return normalizeCreationOptionsJSON({\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: encodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => ({\n alg: entry.alg,\n type: entry.type,\n })),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: options.user.displayName,\n id: encodeBase64Url(options.user.id),\n name: options.user.name,\n },\n }, origin);\n}\nexport function webAuthnRequestOptionsToJSON(options, origin) {\n var _a;\n return normalizeRequestOptionsJSON({\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n challenge: encodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n }, origin);\n}\nexport function normalizeCreationOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rp.id) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rp.id));\n if (!rpId) {\n throw createPasskeyDomException('DataError', 'A relying party id or HTTPS origin is required.');\n }\n return Object.assign(Object.assign({}, options), { excludeCredentials: (_b = options.excludeCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }), rp: Object.assign(Object.assign({}, options.rp), { id: rpId }) });\n}\nexport function normalizeRequestOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rpId) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rpId));\n return Object.assign(Object.assign({}, options), { allowCredentials: (_b = options.allowCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), rpId });\n}\nexport function browserCreationOptionsFromJSON(options) {\n var _a, _b;\n return {\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: decodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: (_b = options.user.displayName) !== null && _b !== void 0 ? _b : options.user.name,\n id: decodeBase64Url(options.user.id),\n name: options.user.name,\n },\n };\n}\nexport function browserRequestOptionsFromJSON(options) {\n var _a;\n return {\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n challenge: decodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n };\n}\nexport async function browserRegistrationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'registration');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'attestationObject' in nativeJson.response) {\n return normalizeRegistrationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n attestationObject: encodeBase64Url(response.attestationObject),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n publicKey: response.getPublicKey ? nullableBufferToOptionalBase64Url(response.getPublicKey()) : undefined,\n publicKeyAlgorithm: response.getPublicKeyAlgorithm ? response.getPublicKeyAlgorithm() : undefined,\n transports: response.getTransports ? response.getTransports() : undefined,\n },\n type: PASSKEY_TYPE,\n };\n}\nexport async function browserAuthenticationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'authentication');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'authenticatorData' in nativeJson.response) {\n return normalizeAuthenticationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n authenticatorData: encodeBase64Url(response.authenticatorData),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n signature: encodeBase64Url(response.signature),\n userHandle: nullableBufferToBase64Url(response.userHandle),\n },\n type: PASSKEY_TYPE,\n };\n}\nexport function credentialFromJSON(credential) {\n const shimCredential = new PasskeyPublicKeyCredential(credential);\n if (typeof globalThis.PublicKeyCredential === 'function') {\n Object.setPrototypeOf(shimCredential, globalThis.PublicKeyCredential.prototype);\n }\n return shimCredential;\n}\nexport function parseCreationOptionsFromJSON(options) {\n return browserCreationOptionsFromJSON(normalizeCreationOptionsJSON(options));\n}\nexport function parseRequestOptionsFromJSON(options) {\n return browserRequestOptionsFromJSON(normalizeRequestOptionsJSON(options));\n}\nexport function decodeBase64Url(value) {\n const bytes = base64UrlToBytes(value);\n return bytes.slice().buffer;\n}\nexport function encodeBase64Url(value) {\n if (typeof value === 'undefined' || value === null) {\n return '';\n }\n const bytes = toUint8Array(value);\n let binary = '';\n bytes.forEach((byte) => {\n binary += String.fromCharCode(byte);\n });\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/u, '');\n}\nexport function resolveOrigin(explicitOrigin, rpId) {\n if (explicitOrigin) {\n return explicitOrigin;\n }\n if (typeof globalThis.location !== 'undefined' && /^https?:$/u.test(globalThis.location.protocol)) {\n return globalThis.location.origin;\n }\n if (rpId) {\n return `https://${rpId}`;\n }\n return undefined;\n}\nexport function createPasskeyDomException(name, message) {\n if (typeof DOMException !== 'undefined') {\n return new DOMException(message, name);\n }\n const error = new Error(message);\n error.name = name;\n return error;\n}\nexport function abortIfNeeded(signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n throw createPasskeyDomException('AbortError', 'The passkey request was aborted.');\n }\n}\nexport function normalizePluginError(error) {\n if (error instanceof Error) {\n return error;\n }\n const message = typeof error === 'object' && error && 'message' in error ? String(error.message) : String(error);\n const name = resolveErrorName(error);\n return createPasskeyDomException(name, message);\n}\nfunction credentialWithToJSON(credential) {\n const toJSON = credential.toJSON;\n if (typeof toJSON !== 'function') {\n return null;\n }\n const json = toJSON();\n if (!json || typeof json !== 'object') {\n return null;\n }\n const response = json.response;\n if (!response) {\n return null;\n }\n if ('attestationObject' in response) {\n return normalizeRegistrationCredential(json);\n }\n if ('authenticatorData' in response) {\n return normalizeAuthenticationCredential(json);\n }\n return null;\n}\nfunction normalizeRegistrationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAttestationResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAuthenticationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAssertionResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAttestationResponse(response) {\n var _a, _b;\n return {\n attestationObject: String((_a = response.attestationObject) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n publicKey: response.publicKey,\n publicKeyAlgorithm: response.publicKeyAlgorithm,\n transports: response.transports,\n };\n}\nfunction normalizeAssertionResponse(response) {\n var _a, _b, _c;\n return {\n authenticatorData: String((_a = response.authenticatorData) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n signature: String((_c = response.signature) !== null && _c !== void 0 ? _c : ''),\n userHandle: typeof response.userHandle === 'undefined' ? null : response.userHandle,\n };\n}\nfunction expectPublicKeyCredential(credential, flow) {\n if (!credential || !(credential instanceof PublicKeyCredential)) {\n throw createPasskeyDomException('InvalidStateError', `The browser did not return a ${flow} credential.`);\n }\n return credential;\n}\nfunction descriptorToJSON(descriptor) {\n var _a;\n return {\n id: typeof descriptor.id === 'string' ? descriptor.id : encodeBase64Url(descriptor.id),\n transports: descriptor.transports ? [...descriptor.transports] : undefined,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction jsonDescriptorToBrowser(descriptor) {\n var _a;\n return {\n id: decodeBase64Url(descriptor.id),\n transports: descriptor.transports,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction cloneExtensions(extensions) {\n if (!extensions) {\n return undefined;\n }\n return JSON.parse(JSON.stringify(extensions));\n}\nfunction nullableBufferToBase64Url(value) {\n if (typeof value === 'undefined') {\n return undefined;\n }\n if (value === null) {\n return null;\n }\n return encodeBase64Url(value);\n}\nfunction nullableBufferToOptionalBase64Url(value) {\n const encoded = nullableBufferToBase64Url(value);\n return encoded !== null && encoded !== void 0 ? encoded : undefined;\n}\nfunction deriveRpId(origin) {\n if (!origin) {\n return undefined;\n }\n try {\n return new URL(origin).hostname;\n }\n catch (_a) {\n return undefined;\n }\n}\nfunction base64UrlToBytes(value) {\n const normalized = value.replace(/-/g, '+').replace(/_/g, '/');\n const padding = normalized.length % 4 === 0 ? '' : '='.repeat(4 - (normalized.length % 4));\n const binary = atob(`${normalized}${padding}`);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\nfunction toUint8Array(value) {\n if (Array.isArray(value)) {\n return Uint8Array.from(value);\n }\n if (ArrayBuffer.isView(value)) {\n return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\n }\n return new Uint8Array(value);\n}\nfunction normalizeAttachment(value) {\n if (value === 'platform' || value === 'cross-platform') {\n return value;\n }\n return undefined;\n}\nfunction clientExtensionResultsToRecord(value) {\n if (!value) {\n return {};\n }\n return JSON.parse(JSON.stringify(value));\n}\nclass PasskeyAuthenticatorAttestationResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.attestationObject = decodeBase64Url(json.attestationObject);\n }\n getPublicKey() {\n return this.json.publicKey ? decodeBase64Url(this.json.publicKey) : null;\n }\n getPublicKeyAlgorithm() {\n var _a;\n return (_a = this.json.publicKeyAlgorithm) !== null && _a !== void 0 ? _a : -7;\n }\n getTransports() {\n return this.json.transports ? [...this.json.transports] : [];\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyAuthenticatorAssertionResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.authenticatorData = decodeBase64Url(json.authenticatorData);\n this.signature = decodeBase64Url(json.signature);\n this.userHandle = json.userHandle ? decodeBase64Url(json.userHandle) : null;\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyPublicKeyCredential {\n constructor(json) {\n var _a;\n this.json = json;\n this.type = PASSKEY_TYPE;\n this.id = json.id;\n this.rawId = decodeBase64Url(json.rawId);\n this.authenticatorAttachment = (_a = json.authenticatorAttachment) !== null && _a !== void 0 ? _a : null;\n this.response =\n 'attestationObject' in json.response\n ? new PasskeyAuthenticatorAttestationResponse(json.response)\n : new PasskeyAuthenticatorAssertionResponse(json.response);\n }\n getClientExtensionResults() {\n var _a;\n return ((_a = this.json.clientExtensionResults) !== null && _a !== void 0 ? _a : {});\n }\n toJSON() {\n return JSON.parse(JSON.stringify(this.json));\n }\n}\nfunction resolveErrorName(error) {\n if (typeof error === 'object' && error) {\n if ('code' in error && typeof error.code === 'string') {\n return error.code;\n }\n if ('data' in error && error.data && typeof error.data === 'object' && 'name' in error.data) {\n const candidate = error.data.name;\n if (typeof candidate === 'string') {\n return candidate;\n }\n }\n }\n return 'UnknownError';\n}\n//# sourceMappingURL=webauthn.js.map","import { abortIfNeeded, createPasskeyDomException, credentialFromJSON, normalizePluginError, parseCreationOptionsFromJSON, parseRequestOptionsFromJSON, webAuthnCreationOptionsToJSON, webAuthnRequestOptionsToJSON, } from './webauthn';\nexport function installWebAuthnShim({ root = globalThis, plugin, options }) {\n var _a;\n const shimRoot = root;\n const config = Object.assign(Object.assign({}, ((_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {})), (options !== null && options !== void 0 ? options : {}));\n shimRoot.__capgoPasskeyShimConfig = config;\n if (shimRoot.__capgoPasskeyShimInstalled && !config.force) {\n return;\n }\n const originalCredentials = shimRoot.navigator.credentials;\n const patchedCredentials = {\n create: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.create) {\n return originalCredentials.create.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential creation is supported.');\n }\n abortIfNeeded(request.signal);\n const response = (await plugin.createCredential({\n origin: currentConfig.origin,\n publicKey: webAuthnCreationOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n get: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.get) {\n return originalCredentials.get.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential requests are supported.');\n }\n abortIfNeeded(request.signal);\n if (request.mediation === 'conditional') {\n throw createPasskeyDomException('NotSupportedError', 'Conditional mediation is not available through the Capacitor passkey shim.');\n }\n const response = (await plugin.getCredential({\n mediation: request.mediation,\n origin: currentConfig.origin,\n publicKey: webAuthnRequestOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n preventSilentAccess: async () => {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.preventSilentAccess) {\n await originalCredentials.preventSilentAccess.call(originalCredentials);\n }\n },\n store: async (credential) => {\n if ((originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.store) && credential) {\n await originalCredentials.store.call(originalCredentials, credential);\n }\n },\n };\n try {\n Object.defineProperty(shimRoot.navigator, 'credentials', {\n configurable: true,\n value: patchedCredentials,\n writable: false,\n });\n }\n catch (_b) {\n shimRoot.navigator.credentials = patchedCredentials;\n }\n installPublicKeyCredentialStatics(shimRoot, plugin);\n shimRoot.__capgoPasskeyShimInstalled = true;\n}\nfunction installPublicKeyCredentialStatics(root, plugin) {\n var _a;\n const nativePublicKeyCredential = (_a = root.PublicKeyCredential) !== null && _a !== void 0 ? _a : class {\n };\n const supportRequest = async () => {\n try {\n return await plugin.isSupported();\n }\n catch (error) {\n throw normalizePluginError(error);\n }\n };\n defineStatic(nativePublicKeyCredential, 'isUserVerifyingPlatformAuthenticatorAvailable', async () => {\n const support = await supportRequest();\n return support.available;\n });\n defineStatic(nativePublicKeyCredential, 'isConditionalMediationAvailable', async () => {\n const support = await supportRequest();\n return support.conditionalMediation;\n });\n defineStatic(nativePublicKeyCredential, 'parseCreationOptionsFromJSON', parseCreationOptionsFromJSON);\n defineStatic(nativePublicKeyCredential, 'parseRequestOptionsFromJSON', parseRequestOptionsFromJSON);\n root.PublicKeyCredential = nativePublicKeyCredential;\n}\nfunction defineStatic(target, key, value) {\n try {\n Object.defineProperty(target, key, {\n configurable: true,\n value,\n writable: true,\n });\n }\n catch (_a) {\n Reflect.set(target, key, value);\n }\n}\n//# sourceMappingURL=shim.js.map","import { registerPlugin } from '@capacitor/core';\nimport { installWebAuthnShim } from './shim';\nimport { createNativeRequest } from './webauthn';\nconst NativeCapacitorPasskey = registerPlugin('CapacitorPasskey', {\n web: () => import('./web').then((module) => new module.CapacitorPasskeyWeb()),\n});\nlet configurationPromise;\nlet cachedConfiguration;\nfunction mergeShimOptions(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration === null || configuration === void 0 ? void 0 : configuration.origin;\n const force = options === null || options === void 0 ? void 0 : options.force;\n if (!origin && force === undefined) {\n return undefined;\n }\n return {\n force,\n origin,\n };\n}\nfunction mergeRuntimeConfiguration(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration.origin;\n const domains = new Set(configuration.domains);\n if (origin) {\n try {\n domains.add(new URL(origin).hostname);\n }\n catch (_b) {\n // Ignore invalid override values here and let native APIs validate later.\n }\n }\n return Object.assign(Object.assign({}, configuration), { domains: [...domains], origin });\n}\nasync function loadConfiguration() {\n try {\n const configuration = await NativeCapacitorPasskey.getConfiguration();\n cachedConfiguration = configuration;\n return configuration;\n }\n catch (error) {\n configurationPromise = undefined;\n throw error;\n }\n}\nconst CapacitorPasskey = {\n async autoShimWebAuthn(options) {\n const configuration = await CapacitorPasskey.getConfiguration();\n if (!configuration.autoShim && !(options === null || options === void 0 ? void 0 : options.force)) {\n return configuration;\n }\n const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);\n cachedConfiguration = effectiveConfiguration;\n installWebAuthnShim({\n options: mergeShimOptions(effectiveConfiguration, options),\n plugin: CapacitorPasskey,\n });\n return effectiveConfiguration;\n },\n async createCredential(options) {\n return NativeCapacitorPasskey.createCredential(createNativeRequest(options));\n },\n async getConfiguration() {\n if (!configurationPromise) {\n configurationPromise = loadConfiguration();\n }\n return configurationPromise;\n },\n async getCredential(options) {\n return NativeCapacitorPasskey.getCredential(createNativeRequest(options));\n },\n async getPluginVersion() {\n return NativeCapacitorPasskey.getPluginVersion();\n },\n async isSupported() {\n return NativeCapacitorPasskey.isSupported();\n },\n shimWebAuthn(options) {\n installWebAuthnShim({\n options: mergeShimOptions(cachedConfiguration, options),\n plugin: CapacitorPasskey,\n });\n },\n};\nexport * from './definitions';\nexport { CapacitorPasskey };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { browserAuthenticationToJSON, browserCreationOptionsFromJSON, browserRegistrationToJSON, browserRequestOptionsFromJSON, createPasskeyDomException, } from './webauthn';\nexport class CapacitorPasskeyWeb extends WebPlugin {\n async createCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.create({\n publicKey: browserCreationOptionsFromJSON(parsed),\n });\n return browserRegistrationToJSON(credential);\n }\n async getCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.get({\n publicKey: browserRequestOptionsFromJSON(parsed),\n });\n return browserAuthenticationToJSON(credential);\n }\n async getConfiguration() {\n const origin = this.currentOrigin();\n const domains = origin ? [new URL(origin).hostname] : [];\n return {\n autoShim: true,\n domains,\n origin,\n platform: 'web',\n };\n }\n async isSupported() {\n var _a, _b, _c, _d;\n const available = typeof globalThis.PublicKeyCredential !== 'undefined' &&\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) === 'function' &&\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) === 'function';\n let conditionalMediation = false;\n if (available && typeof globalThis.PublicKeyCredential.isConditionalMediationAvailable === 'function') {\n conditionalMediation = await globalThis.PublicKeyCredential.isConditionalMediationAvailable();\n }\n return {\n available,\n conditionalMediation,\n platform: 'web',\n };\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n ensureCredentials() {\n var _a, _b, _c, _d;\n if (typeof globalThis.PublicKeyCredential === 'undefined' ||\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) !== 'function' ||\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) !== 'function') {\n throw createPasskeyDomException('NotSupportedError', 'WebAuthn is not available in this browser.');\n }\n return globalThis.navigator.credentials;\n }\n currentOrigin() {\n if (typeof globalThis.location === 'undefined') {\n return undefined;\n }\n if (globalThis.location.protocol !== 'http:' && globalThis.location.protocol !== 'https:') {\n return undefined;\n }\n return globalThis.location.origin;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAA,MAAM,YAAY,GAAG,YAAY;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,EAAE,EAAE,EAAE,EAAE,EAAE,EAAE;AAC1B,QAAQ,IAAI,OAAO,UAAU,CAAC,mBAAmB,KAAK,WAAW;AACjE,YAAY,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,UAAU;AACzK,YAAY,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE;AACxK,YAAY,MAAM,yBAAyB,CAAC,mBAAmB,EAAE,4CAA4C,CAAC;AAC9G,QAAQ;AACR,QAAQ,OAAO,UAAU,CAAC,SAAS,CAAC,WAAW;AAC/C,IAAI;AACJ,IAAI,aAAa,GAAG;AACpB,QAAQ,IAAI,OAAO,UAAU,CAAC,QAAQ,KAAK,WAAW,EAAE;AACxD,YAAY,OAAO,SAAS;AAC5B,QAAQ;AACR,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,EAAE;AACnG,YAAY,OAAO,SAAS;AAC5B,QAAQ;AACR,QAAQ,OAAO,UAAU,CAAC,QAAQ,CAAC,MAAM;AACzC,IAAI;AACJ;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.cjs.js","sources":["esm/webauthn.js","esm/shim.js","esm/index.js","esm/web.js"],"sourcesContent":["const PASSKEY_TYPE = 'public-key';\nexport function createNativeRequest(options) {\n if ('mediation' in options) {\n const getOptions = options;\n return {\n origin: resolveOrigin(getOptions.origin, getOptions.publicKey.rpId),\n requestJson: JSON.stringify(normalizeRequestOptionsJSON(getOptions.publicKey, getOptions.origin)),\n };\n }\n const createOptions = options;\n return {\n origin: resolveOrigin(createOptions.origin, createOptions.publicKey.rp.id),\n requestJson: JSON.stringify(normalizeCreationOptionsJSON(createOptions.publicKey, createOptions.origin)),\n };\n}\nexport function webAuthnCreationOptionsToJSON(options, origin) {\n var _a;\n return normalizeCreationOptionsJSON({\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: encodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => ({\n alg: entry.alg,\n type: entry.type,\n })),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: options.user.displayName,\n id: encodeBase64Url(options.user.id),\n name: options.user.name,\n },\n }, origin);\n}\nexport function webAuthnRequestOptionsToJSON(options, origin) {\n var _a;\n return normalizeRequestOptionsJSON({\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n challenge: encodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n }, origin);\n}\nexport function normalizeCreationOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rp.id) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rp.id));\n if (!rpId) {\n throw createPasskeyDomException('DataError', 'A relying party id or HTTPS origin is required.');\n }\n return Object.assign(Object.assign({}, options), { excludeCredentials: (_b = options.excludeCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }), rp: Object.assign(Object.assign({}, options.rp), { id: rpId }) });\n}\nexport function normalizeRequestOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rpId) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rpId));\n return Object.assign(Object.assign({}, options), { allowCredentials: (_b = options.allowCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), rpId });\n}\nexport function browserCreationOptionsFromJSON(options) {\n var _a, _b;\n return {\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: decodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: (_b = options.user.displayName) !== null && _b !== void 0 ? _b : options.user.name,\n id: decodeBase64Url(options.user.id),\n name: options.user.name,\n },\n };\n}\nexport function browserRequestOptionsFromJSON(options) {\n var _a;\n return {\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n challenge: decodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n };\n}\nexport async function browserRegistrationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'registration');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'attestationObject' in nativeJson.response) {\n return normalizeRegistrationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n attestationObject: encodeBase64Url(response.attestationObject),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n publicKey: response.getPublicKey ? nullableBufferToOptionalBase64Url(response.getPublicKey()) : undefined,\n publicKeyAlgorithm: response.getPublicKeyAlgorithm ? response.getPublicKeyAlgorithm() : undefined,\n transports: response.getTransports ? response.getTransports() : undefined,\n },\n type: PASSKEY_TYPE,\n };\n}\nexport async function browserAuthenticationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'authentication');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'authenticatorData' in nativeJson.response) {\n return normalizeAuthenticationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n authenticatorData: encodeBase64Url(response.authenticatorData),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n signature: encodeBase64Url(response.signature),\n userHandle: nullableBufferToBase64Url(response.userHandle),\n },\n type: PASSKEY_TYPE,\n };\n}\nexport function credentialFromJSON(credential) {\n const shimCredential = new PasskeyPublicKeyCredential(credential);\n if (typeof globalThis.PublicKeyCredential === 'function') {\n Object.setPrototypeOf(shimCredential, globalThis.PublicKeyCredential.prototype);\n }\n return shimCredential;\n}\nexport function parseCreationOptionsFromJSON(options) {\n return browserCreationOptionsFromJSON(normalizeCreationOptionsJSON(options));\n}\nexport function parseRequestOptionsFromJSON(options) {\n return browserRequestOptionsFromJSON(normalizeRequestOptionsJSON(options));\n}\nexport function decodeBase64Url(value) {\n const bytes = base64UrlToBytes(value);\n return bytes.slice().buffer;\n}\nexport function encodeBase64Url(value) {\n if (typeof value === 'undefined' || value === null) {\n return '';\n }\n const bytes = toUint8Array(value);\n let binary = '';\n bytes.forEach((byte) => {\n binary += String.fromCharCode(byte);\n });\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/u, '');\n}\nexport function resolveOrigin(explicitOrigin, rpId) {\n if (explicitOrigin) {\n return explicitOrigin;\n }\n if (typeof globalThis.location !== 'undefined' && /^https?:$/u.test(globalThis.location.protocol)) {\n return globalThis.location.origin;\n }\n if (rpId) {\n return `https://${rpId}`;\n }\n return undefined;\n}\nexport function createPasskeyDomException(name, message) {\n if (typeof DOMException !== 'undefined') {\n return new DOMException(message, name);\n }\n const error = new Error(message);\n error.name = name;\n return error;\n}\nexport function abortIfNeeded(signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n throw createPasskeyDomException('AbortError', 'The passkey request was aborted.');\n }\n}\nexport function normalizePluginError(error) {\n if (error instanceof Error) {\n return error;\n }\n const message = typeof error === 'object' && error && 'message' in error ? String(error.message) : String(error);\n const name = resolveErrorName(error);\n return createPasskeyDomException(name, message);\n}\nfunction credentialWithToJSON(credential) {\n const toJSON = credential.toJSON;\n if (typeof toJSON !== 'function') {\n return null;\n }\n const json = toJSON();\n if (!json || typeof json !== 'object') {\n return null;\n }\n const response = json.response;\n if (!response) {\n return null;\n }\n if ('attestationObject' in response) {\n return normalizeRegistrationCredential(json);\n }\n if ('authenticatorData' in response) {\n return normalizeAuthenticationCredential(json);\n }\n return null;\n}\nfunction normalizeRegistrationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAttestationResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAuthenticationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAssertionResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAttestationResponse(response) {\n var _a, _b;\n return {\n attestationObject: String((_a = response.attestationObject) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n publicKey: response.publicKey,\n publicKeyAlgorithm: response.publicKeyAlgorithm,\n transports: response.transports,\n };\n}\nfunction normalizeAssertionResponse(response) {\n var _a, _b, _c;\n return {\n authenticatorData: String((_a = response.authenticatorData) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n signature: String((_c = response.signature) !== null && _c !== void 0 ? _c : ''),\n userHandle: typeof response.userHandle === 'undefined' ? null : response.userHandle,\n };\n}\nfunction expectPublicKeyCredential(credential, flow) {\n if (!credential || !(credential instanceof PublicKeyCredential)) {\n throw createPasskeyDomException('InvalidStateError', `The browser did not return a ${flow} credential.`);\n }\n return credential;\n}\nfunction descriptorToJSON(descriptor) {\n var _a;\n return {\n id: typeof descriptor.id === 'string' ? descriptor.id : encodeBase64Url(descriptor.id),\n transports: descriptor.transports ? [...descriptor.transports] : undefined,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction jsonDescriptorToBrowser(descriptor) {\n var _a;\n return {\n id: decodeBase64Url(descriptor.id),\n transports: descriptor.transports,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction cloneExtensions(extensions) {\n if (!extensions) {\n return undefined;\n }\n return JSON.parse(JSON.stringify(extensions));\n}\nfunction nullableBufferToBase64Url(value) {\n if (typeof value === 'undefined') {\n return undefined;\n }\n if (value === null) {\n return null;\n }\n return encodeBase64Url(value);\n}\nfunction nullableBufferToOptionalBase64Url(value) {\n const encoded = nullableBufferToBase64Url(value);\n return encoded !== null && encoded !== void 0 ? encoded : undefined;\n}\nfunction deriveRpId(origin) {\n if (!origin) {\n return undefined;\n }\n try {\n return new URL(origin).hostname;\n }\n catch (_a) {\n return undefined;\n }\n}\nfunction base64UrlToBytes(value) {\n const normalized = value.replace(/-/g, '+').replace(/_/g, '/');\n const padding = normalized.length % 4 === 0 ? '' : '='.repeat(4 - (normalized.length % 4));\n const binary = atob(`${normalized}${padding}`);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\nfunction toUint8Array(value) {\n if (Array.isArray(value)) {\n return Uint8Array.from(value);\n }\n if (ArrayBuffer.isView(value)) {\n return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\n }\n return new Uint8Array(value);\n}\nfunction normalizeAttachment(value) {\n if (value === 'platform' || value === 'cross-platform') {\n return value;\n }\n return undefined;\n}\nfunction clientExtensionResultsToRecord(value) {\n if (!value) {\n return {};\n }\n return JSON.parse(JSON.stringify(value));\n}\nclass PasskeyAuthenticatorAttestationResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.attestationObject = decodeBase64Url(json.attestationObject);\n }\n getPublicKey() {\n return this.json.publicKey ? decodeBase64Url(this.json.publicKey) : null;\n }\n getPublicKeyAlgorithm() {\n var _a;\n return (_a = this.json.publicKeyAlgorithm) !== null && _a !== void 0 ? _a : -7;\n }\n getTransports() {\n return this.json.transports ? [...this.json.transports] : [];\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyAuthenticatorAssertionResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.authenticatorData = decodeBase64Url(json.authenticatorData);\n this.signature = decodeBase64Url(json.signature);\n this.userHandle = json.userHandle ? decodeBase64Url(json.userHandle) : null;\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyPublicKeyCredential {\n constructor(json) {\n var _a;\n this.json = json;\n this.type = PASSKEY_TYPE;\n this.id = json.id;\n this.rawId = decodeBase64Url(json.rawId);\n this.authenticatorAttachment = (_a = json.authenticatorAttachment) !== null && _a !== void 0 ? _a : null;\n this.response =\n 'attestationObject' in json.response\n ? new PasskeyAuthenticatorAttestationResponse(json.response)\n : new PasskeyAuthenticatorAssertionResponse(json.response);\n }\n getClientExtensionResults() {\n var _a;\n return ((_a = this.json.clientExtensionResults) !== null && _a !== void 0 ? _a : {});\n }\n toJSON() {\n return JSON.parse(JSON.stringify(this.json));\n }\n}\nfunction resolveErrorName(error) {\n if (typeof error === 'object' && error) {\n if ('code' in error && typeof error.code === 'string') {\n return error.code;\n }\n if ('data' in error && error.data && typeof error.data === 'object' && 'name' in error.data) {\n const candidate = error.data.name;\n if (typeof candidate === 'string') {\n return candidate;\n }\n }\n }\n return 'UnknownError';\n}\n//# sourceMappingURL=webauthn.js.map","import { abortIfNeeded, createPasskeyDomException, credentialFromJSON, normalizePluginError, parseCreationOptionsFromJSON, parseRequestOptionsFromJSON, webAuthnCreationOptionsToJSON, webAuthnRequestOptionsToJSON, } from './webauthn';\nexport function installWebAuthnShim({ root = globalThis, plugin, options }) {\n var _a;\n const shimRoot = root;\n const config = Object.assign(Object.assign({}, ((_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {})), (options !== null && options !== void 0 ? options : {}));\n shimRoot.__capgoPasskeyShimConfig = config;\n if (shimRoot.__capgoPasskeyShimInstalled && !config.force) {\n return;\n }\n const originalCredentials = shimRoot.navigator.credentials;\n const patchedCredentials = {\n create: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.create) {\n return originalCredentials.create.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential creation is supported.');\n }\n abortIfNeeded(request.signal);\n const response = (await plugin.createCredential({\n origin: currentConfig.origin,\n publicKey: webAuthnCreationOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n get: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.get) {\n return originalCredentials.get.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential requests are supported.');\n }\n abortIfNeeded(request.signal);\n if (request.mediation === 'conditional') {\n throw createPasskeyDomException('NotSupportedError', 'Conditional mediation is not available through the Capacitor passkey shim.');\n }\n const response = (await plugin.getCredential({\n mediation: request.mediation,\n origin: currentConfig.origin,\n publicKey: webAuthnRequestOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n preventSilentAccess: async () => {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.preventSilentAccess) {\n await originalCredentials.preventSilentAccess.call(originalCredentials);\n }\n },\n store: async (credential) => {\n if ((originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.store) && credential) {\n await originalCredentials.store.call(originalCredentials, credential);\n }\n },\n };\n try {\n Object.defineProperty(shimRoot.navigator, 'credentials', {\n configurable: true,\n value: patchedCredentials,\n writable: false,\n });\n }\n catch (_b) {\n shimRoot.navigator.credentials = patchedCredentials;\n }\n installPublicKeyCredentialStatics(shimRoot, plugin);\n shimRoot.__capgoPasskeyShimInstalled = true;\n}\nfunction installPublicKeyCredentialStatics(root, plugin) {\n var _a;\n const nativePublicKeyCredential = (_a = root.PublicKeyCredential) !== null && _a !== void 0 ? _a : class {\n };\n const supportRequest = async () => {\n try {\n return await plugin.isSupported();\n }\n catch (error) {\n throw normalizePluginError(error);\n }\n };\n defineStatic(nativePublicKeyCredential, 'isUserVerifyingPlatformAuthenticatorAvailable', async () => {\n const support = await supportRequest();\n return support.available;\n });\n defineStatic(nativePublicKeyCredential, 'isConditionalMediationAvailable', async () => {\n const support = await supportRequest();\n return support.conditionalMediation;\n });\n defineStatic(nativePublicKeyCredential, 'parseCreationOptionsFromJSON', parseCreationOptionsFromJSON);\n defineStatic(nativePublicKeyCredential, 'parseRequestOptionsFromJSON', parseRequestOptionsFromJSON);\n root.PublicKeyCredential = nativePublicKeyCredential;\n}\nfunction defineStatic(target, key, value) {\n try {\n Object.defineProperty(target, key, {\n configurable: true,\n value,\n writable: true,\n });\n }\n catch (_a) {\n Reflect.set(target, key, value);\n }\n}\n//# sourceMappingURL=shim.js.map","import { registerPlugin } from '@capacitor/core';\nimport { installWebAuthnShim } from './shim';\nimport { createNativeRequest } from './webauthn';\nconst NativeCapacitorPasskey = registerPlugin('CapacitorPasskey', {\n web: () => import('./web').then((module) => new module.CapacitorPasskeyWeb()),\n});\nlet configurationPromise;\nlet cachedConfiguration;\nfunction mergeShimOptions(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration === null || configuration === void 0 ? void 0 : configuration.origin;\n const force = options === null || options === void 0 ? void 0 : options.force;\n if (!origin && force === undefined) {\n return undefined;\n }\n return {\n force,\n origin,\n };\n}\nfunction mergeRuntimeConfiguration(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration.origin;\n const domains = new Set(configuration.domains);\n if (origin) {\n try {\n domains.add(new URL(origin).hostname);\n }\n catch (_b) {\n // Ignore invalid override values here and let native APIs validate later.\n }\n }\n return Object.assign(Object.assign({}, configuration), { domains: [...domains], origin });\n}\nasync function loadConfiguration() {\n try {\n const configuration = await NativeCapacitorPasskey.getConfiguration();\n cachedConfiguration = configuration;\n return configuration;\n }\n catch (error) {\n configurationPromise = undefined;\n throw error;\n }\n}\nconst CapacitorPasskey = {\n async autoShimWebAuthn(options) {\n const configuration = await CapacitorPasskey.getConfiguration();\n const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);\n cachedConfiguration = effectiveConfiguration;\n installWebAuthnShim({\n options: mergeShimOptions(effectiveConfiguration, options),\n plugin: CapacitorPasskey,\n });\n return effectiveConfiguration;\n },\n async createCredential(options) {\n return NativeCapacitorPasskey.createCredential(createNativeRequest(options));\n },\n async getConfiguration() {\n if (!configurationPromise) {\n configurationPromise = loadConfiguration();\n }\n return configurationPromise;\n },\n async getCredential(options) {\n return NativeCapacitorPasskey.getCredential(createNativeRequest(options));\n },\n async getPluginVersion() {\n return NativeCapacitorPasskey.getPluginVersion();\n },\n async isSupported() {\n return NativeCapacitorPasskey.isSupported();\n },\n shimWebAuthn(options) {\n installWebAuthnShim({\n options: mergeShimOptions(cachedConfiguration, options),\n plugin: CapacitorPasskey,\n });\n },\n};\nexport * from './definitions';\nexport { CapacitorPasskey };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { browserAuthenticationToJSON, browserCreationOptionsFromJSON, browserRegistrationToJSON, browserRequestOptionsFromJSON, createPasskeyDomException, } from './webauthn';\nexport class CapacitorPasskeyWeb extends WebPlugin {\n async createCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.create({\n publicKey: browserCreationOptionsFromJSON(parsed),\n });\n return browserRegistrationToJSON(credential);\n }\n async getCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.get({\n publicKey: browserRequestOptionsFromJSON(parsed),\n });\n return browserAuthenticationToJSON(credential);\n }\n async getConfiguration() {\n const origin = this.currentOrigin();\n const domains = origin ? [new URL(origin).hostname] : [];\n return {\n autoShim: true,\n domains,\n origin,\n platform: 'web',\n };\n }\n async isSupported() {\n var _a, _b, _c, _d;\n const available = typeof globalThis.PublicKeyCredential !== 'undefined' &&\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) === 'function' &&\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) === 'function';\n let conditionalMediation = false;\n if (available && typeof globalThis.PublicKeyCredential.isConditionalMediationAvailable === 'function') {\n conditionalMediation = await globalThis.PublicKeyCredential.isConditionalMediationAvailable();\n }\n return {\n available,\n conditionalMediation,\n platform: 'web',\n };\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n ensureCredentials() {\n var _a, _b, _c, _d;\n if (typeof globalThis.PublicKeyCredential === 'undefined' ||\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) !== 'function' ||\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) !== 'function') {\n throw createPasskeyDomException('NotSupportedError', 'WebAuthn is not available in this browser.');\n }\n return globalThis.navigator.credentials;\n }\n currentOrigin() {\n if (typeof globalThis.location === 'undefined') {\n return undefined;\n }\n if (globalThis.location.protocol !== 'http:' && globalThis.location.protocol !== 'https:') {\n return undefined;\n }\n return globalThis.location.origin;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;;AAAA,MAAM,YAAY,GAAG,YAAY;AAC1B,SAAS,mBAAmB,CAAC,OAAO,EAAE;AAC7C,IAAI,IAAI,WAAW,IAAI,OAAO,EAAE;AAChC,QAAQ,MAAM,UAAU,GAAG,OAAO;AAClC,QAAQ,OAAO;AACf,YAAY,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC;AAC/E,YAAY,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;AAC7G,SAAS;AACT,IAAI;AACJ,IAAI,MAAM,aAAa,GAAG,OAAO;AACjC,IAAI,OAAO;AACX,QAAQ,MAAM,EAAE,aAAa,CAAC,aAAa,CAAC,MAAM,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,EAAE,CAAC;AAClF,QAAQ,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,4BAA4B,CAAC,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;AAChH,KAAK;AACL;AACO,SAAS,6BAA6B,CAAC,OAAO,EAAE,MAAM,EAAE;AAC/D,IAAI,IAAI,EAAE;AACV,IAAI,OAAO,4BAA4B,CAAC;AACxC,QAAQ,WAAW,EAAE,OAAO,CAAC,WAAW;AACxC,QAAQ,sBAAsB,EAAE,OAAO,CAAC;AACxC,cAAc;AACd,gBAAgB,uBAAuB,EA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ugin.js CHANGED
@@ -593,9 +593,6 @@ var capacitorPasskey = (function (exports, core) {
593
593
  const CapacitorPasskey = {
594
594
  async autoShimWebAuthn(options) {
595
595
  const configuration = await CapacitorPasskey.getConfiguration();
596
- if (!configuration.autoShim && !(options === null || options === void 0 ? void 0 : options.force)) {
597
- return configuration;
598
- }
599
596
  const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);
600
597
  cachedConfiguration = effectiveConfiguration;
601
598
  installWebAuthnShim({
@@ -1 +1 @@
1
- {"version":3,"file":"plugin.js","sources":["esm/webauthn.js","esm/shim.js","esm/index.js","esm/web.js"],"sourcesContent":["const PASSKEY_TYPE = 'public-key';\nexport function createNativeRequest(options) {\n if ('mediation' in options) {\n const getOptions = options;\n return {\n origin: resolveOrigin(getOptions.origin, getOptions.publicKey.rpId),\n requestJson: JSON.stringify(normalizeRequestOptionsJSON(getOptions.publicKey, getOptions.origin)),\n };\n }\n const createOptions = options;\n return {\n origin: resolveOrigin(createOptions.origin, createOptions.publicKey.rp.id),\n requestJson: JSON.stringify(normalizeCreationOptionsJSON(createOptions.publicKey, createOptions.origin)),\n };\n}\nexport function webAuthnCreationOptionsToJSON(options, origin) {\n var _a;\n return normalizeCreationOptionsJSON({\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: encodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => ({\n alg: entry.alg,\n type: entry.type,\n })),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: options.user.displayName,\n id: encodeBase64Url(options.user.id),\n name: options.user.name,\n },\n }, origin);\n}\nexport function webAuthnRequestOptionsToJSON(options, origin) {\n var _a;\n return normalizeRequestOptionsJSON({\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n challenge: encodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n }, origin);\n}\nexport function normalizeCreationOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rp.id) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rp.id));\n if (!rpId) {\n throw createPasskeyDomException('DataError', 'A relying party id or HTTPS origin is required.');\n }\n return Object.assign(Object.assign({}, options), { excludeCredentials: (_b = options.excludeCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }), rp: Object.assign(Object.assign({}, options.rp), { id: rpId }) });\n}\nexport function normalizeRequestOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rpId) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rpId));\n return Object.assign(Object.assign({}, options), { allowCredentials: (_b = options.allowCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), rpId });\n}\nexport function browserCreationOptionsFromJSON(options) {\n var _a, _b;\n return {\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: decodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: (_b = options.user.displayName) !== null && _b !== void 0 ? _b : options.user.name,\n id: decodeBase64Url(options.user.id),\n name: options.user.name,\n },\n };\n}\nexport function browserRequestOptionsFromJSON(options) {\n var _a;\n return {\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n challenge: decodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n };\n}\nexport async function browserRegistrationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'registration');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'attestationObject' in nativeJson.response) {\n return normalizeRegistrationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n attestationObject: encodeBase64Url(response.attestationObject),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n publicKey: response.getPublicKey ? nullableBufferToOptionalBase64Url(response.getPublicKey()) : undefined,\n publicKeyAlgorithm: response.getPublicKeyAlgorithm ? response.getPublicKeyAlgorithm() : undefined,\n transports: response.getTransports ? response.getTransports() : undefined,\n },\n type: PASSKEY_TYPE,\n };\n}\nexport async function browserAuthenticationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'authentication');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'authenticatorData' in nativeJson.response) {\n return normalizeAuthenticationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n authenticatorData: encodeBase64Url(response.authenticatorData),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n signature: encodeBase64Url(response.signature),\n userHandle: nullableBufferToBase64Url(response.userHandle),\n },\n type: PASSKEY_TYPE,\n };\n}\nexport function credentialFromJSON(credential) {\n const shimCredential = new PasskeyPublicKeyCredential(credential);\n if (typeof globalThis.PublicKeyCredential === 'function') {\n Object.setPrototypeOf(shimCredential, globalThis.PublicKeyCredential.prototype);\n }\n return shimCredential;\n}\nexport function parseCreationOptionsFromJSON(options) {\n return browserCreationOptionsFromJSON(normalizeCreationOptionsJSON(options));\n}\nexport function parseRequestOptionsFromJSON(options) {\n return browserRequestOptionsFromJSON(normalizeRequestOptionsJSON(options));\n}\nexport function decodeBase64Url(value) {\n const bytes = base64UrlToBytes(value);\n return bytes.slice().buffer;\n}\nexport function encodeBase64Url(value) {\n if (typeof value === 'undefined' || value === null) {\n return '';\n }\n const bytes = toUint8Array(value);\n let binary = '';\n bytes.forEach((byte) => {\n binary += String.fromCharCode(byte);\n });\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/u, '');\n}\nexport function resolveOrigin(explicitOrigin, rpId) {\n if (explicitOrigin) {\n return explicitOrigin;\n }\n if (typeof globalThis.location !== 'undefined' && /^https?:$/u.test(globalThis.location.protocol)) {\n return globalThis.location.origin;\n }\n if (rpId) {\n return `https://${rpId}`;\n }\n return undefined;\n}\nexport function createPasskeyDomException(name, message) {\n if (typeof DOMException !== 'undefined') {\n return new DOMException(message, name);\n }\n const error = new Error(message);\n error.name = name;\n return error;\n}\nexport function abortIfNeeded(signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n throw createPasskeyDomException('AbortError', 'The passkey request was aborted.');\n }\n}\nexport function normalizePluginError(error) {\n if (error instanceof Error) {\n return error;\n }\n const message = typeof error === 'object' && error && 'message' in error ? String(error.message) : String(error);\n const name = resolveErrorName(error);\n return createPasskeyDomException(name, message);\n}\nfunction credentialWithToJSON(credential) {\n const toJSON = credential.toJSON;\n if (typeof toJSON !== 'function') {\n return null;\n }\n const json = toJSON();\n if (!json || typeof json !== 'object') {\n return null;\n }\n const response = json.response;\n if (!response) {\n return null;\n }\n if ('attestationObject' in response) {\n return normalizeRegistrationCredential(json);\n }\n if ('authenticatorData' in response) {\n return normalizeAuthenticationCredential(json);\n }\n return null;\n}\nfunction normalizeRegistrationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAttestationResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAuthenticationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAssertionResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAttestationResponse(response) {\n var _a, _b;\n return {\n attestationObject: String((_a = response.attestationObject) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n publicKey: response.publicKey,\n publicKeyAlgorithm: response.publicKeyAlgorithm,\n transports: response.transports,\n };\n}\nfunction normalizeAssertionResponse(response) {\n var _a, _b, _c;\n return {\n authenticatorData: String((_a = response.authenticatorData) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n signature: String((_c = response.signature) !== null && _c !== void 0 ? _c : ''),\n userHandle: typeof response.userHandle === 'undefined' ? null : response.userHandle,\n };\n}\nfunction expectPublicKeyCredential(credential, flow) {\n if (!credential || !(credential instanceof PublicKeyCredential)) {\n throw createPasskeyDomException('InvalidStateError', `The browser did not return a ${flow} credential.`);\n }\n return credential;\n}\nfunction descriptorToJSON(descriptor) {\n var _a;\n return {\n id: typeof descriptor.id === 'string' ? descriptor.id : encodeBase64Url(descriptor.id),\n transports: descriptor.transports ? [...descriptor.transports] : undefined,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction jsonDescriptorToBrowser(descriptor) {\n var _a;\n return {\n id: decodeBase64Url(descriptor.id),\n transports: descriptor.transports,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction cloneExtensions(extensions) {\n if (!extensions) {\n return undefined;\n }\n return JSON.parse(JSON.stringify(extensions));\n}\nfunction nullableBufferToBase64Url(value) {\n if (typeof value === 'undefined') {\n return undefined;\n }\n if (value === null) {\n return null;\n }\n return encodeBase64Url(value);\n}\nfunction nullableBufferToOptionalBase64Url(value) {\n const encoded = nullableBufferToBase64Url(value);\n return encoded !== null && encoded !== void 0 ? encoded : undefined;\n}\nfunction deriveRpId(origin) {\n if (!origin) {\n return undefined;\n }\n try {\n return new URL(origin).hostname;\n }\n catch (_a) {\n return undefined;\n }\n}\nfunction base64UrlToBytes(value) {\n const normalized = value.replace(/-/g, '+').replace(/_/g, '/');\n const padding = normalized.length % 4 === 0 ? '' : '='.repeat(4 - (normalized.length % 4));\n const binary = atob(`${normalized}${padding}`);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\nfunction toUint8Array(value) {\n if (Array.isArray(value)) {\n return Uint8Array.from(value);\n }\n if (ArrayBuffer.isView(value)) {\n return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\n }\n return new Uint8Array(value);\n}\nfunction normalizeAttachment(value) {\n if (value === 'platform' || value === 'cross-platform') {\n return value;\n }\n return undefined;\n}\nfunction clientExtensionResultsToRecord(value) {\n if (!value) {\n return {};\n }\n return JSON.parse(JSON.stringify(value));\n}\nclass PasskeyAuthenticatorAttestationResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.attestationObject = decodeBase64Url(json.attestationObject);\n }\n getPublicKey() {\n return this.json.publicKey ? decodeBase64Url(this.json.publicKey) : null;\n }\n getPublicKeyAlgorithm() {\n var _a;\n return (_a = this.json.publicKeyAlgorithm) !== null && _a !== void 0 ? _a : -7;\n }\n getTransports() {\n return this.json.transports ? [...this.json.transports] : [];\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyAuthenticatorAssertionResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.authenticatorData = decodeBase64Url(json.authenticatorData);\n this.signature = decodeBase64Url(json.signature);\n this.userHandle = json.userHandle ? decodeBase64Url(json.userHandle) : null;\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyPublicKeyCredential {\n constructor(json) {\n var _a;\n this.json = json;\n this.type = PASSKEY_TYPE;\n this.id = json.id;\n this.rawId = decodeBase64Url(json.rawId);\n this.authenticatorAttachment = (_a = json.authenticatorAttachment) !== null && _a !== void 0 ? _a : null;\n this.response =\n 'attestationObject' in json.response\n ? new PasskeyAuthenticatorAttestationResponse(json.response)\n : new PasskeyAuthenticatorAssertionResponse(json.response);\n }\n getClientExtensionResults() {\n var _a;\n return ((_a = this.json.clientExtensionResults) !== null && _a !== void 0 ? _a : {});\n }\n toJSON() {\n return JSON.parse(JSON.stringify(this.json));\n }\n}\nfunction resolveErrorName(error) {\n if (typeof error === 'object' && error) {\n if ('code' in error && typeof error.code === 'string') {\n return error.code;\n }\n if ('data' in error && error.data && typeof error.data === 'object' && 'name' in error.data) {\n const candidate = error.data.name;\n if (typeof candidate === 'string') {\n return candidate;\n }\n }\n }\n return 'UnknownError';\n}\n//# sourceMappingURL=webauthn.js.map","import { abortIfNeeded, createPasskeyDomException, credentialFromJSON, normalizePluginError, parseCreationOptionsFromJSON, parseRequestOptionsFromJSON, webAuthnCreationOptionsToJSON, webAuthnRequestOptionsToJSON, } from './webauthn';\nexport function installWebAuthnShim({ root = globalThis, plugin, options }) {\n var _a;\n const shimRoot = root;\n const config = Object.assign(Object.assign({}, ((_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {})), (options !== null && options !== void 0 ? options : {}));\n shimRoot.__capgoPasskeyShimConfig = config;\n if (shimRoot.__capgoPasskeyShimInstalled && !config.force) {\n return;\n }\n const originalCredentials = shimRoot.navigator.credentials;\n const patchedCredentials = {\n create: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.create) {\n return originalCredentials.create.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential creation is supported.');\n }\n abortIfNeeded(request.signal);\n const response = (await plugin.createCredential({\n origin: currentConfig.origin,\n publicKey: webAuthnCreationOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n get: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.get) {\n return originalCredentials.get.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential requests are supported.');\n }\n abortIfNeeded(request.signal);\n if (request.mediation === 'conditional') {\n throw createPasskeyDomException('NotSupportedError', 'Conditional mediation is not available through the Capacitor passkey shim.');\n }\n const response = (await plugin.getCredential({\n mediation: request.mediation,\n origin: currentConfig.origin,\n publicKey: webAuthnRequestOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n preventSilentAccess: async () => {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.preventSilentAccess) {\n await originalCredentials.preventSilentAccess.call(originalCredentials);\n }\n },\n store: async (credential) => {\n if ((originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.store) && credential) {\n await originalCredentials.store.call(originalCredentials, credential);\n }\n },\n };\n try {\n Object.defineProperty(shimRoot.navigator, 'credentials', {\n configurable: true,\n value: patchedCredentials,\n writable: false,\n });\n }\n catch (_b) {\n shimRoot.navigator.credentials = patchedCredentials;\n }\n installPublicKeyCredentialStatics(shimRoot, plugin);\n shimRoot.__capgoPasskeyShimInstalled = true;\n}\nfunction installPublicKeyCredentialStatics(root, plugin) {\n var _a;\n const nativePublicKeyCredential = (_a = root.PublicKeyCredential) !== null && _a !== void 0 ? _a : class {\n };\n const supportRequest = async () => {\n try {\n return await plugin.isSupported();\n }\n catch (error) {\n throw normalizePluginError(error);\n }\n };\n defineStatic(nativePublicKeyCredential, 'isUserVerifyingPlatformAuthenticatorAvailable', async () => {\n const support = await supportRequest();\n return support.available;\n });\n defineStatic(nativePublicKeyCredential, 'isConditionalMediationAvailable', async () => {\n const support = await supportRequest();\n return support.conditionalMediation;\n });\n defineStatic(nativePublicKeyCredential, 'parseCreationOptionsFromJSON', parseCreationOptionsFromJSON);\n defineStatic(nativePublicKeyCredential, 'parseRequestOptionsFromJSON', parseRequestOptionsFromJSON);\n root.PublicKeyCredential = nativePublicKeyCredential;\n}\nfunction defineStatic(target, key, value) {\n try {\n Object.defineProperty(target, key, {\n configurable: true,\n value,\n writable: true,\n });\n }\n catch (_a) {\n Reflect.set(target, key, value);\n }\n}\n//# sourceMappingURL=shim.js.map","import { registerPlugin } from '@capacitor/core';\nimport { installWebAuthnShim } from './shim';\nimport { createNativeRequest } from './webauthn';\nconst NativeCapacitorPasskey = registerPlugin('CapacitorPasskey', {\n web: () => import('./web').then((module) => new module.CapacitorPasskeyWeb()),\n});\nlet configurationPromise;\nlet cachedConfiguration;\nfunction mergeShimOptions(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration === null || configuration === void 0 ? void 0 : configuration.origin;\n const force = options === null || options === void 0 ? void 0 : options.force;\n if (!origin && force === undefined) {\n return undefined;\n }\n return {\n force,\n origin,\n };\n}\nfunction mergeRuntimeConfiguration(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration.origin;\n const domains = new Set(configuration.domains);\n if (origin) {\n try {\n domains.add(new URL(origin).hostname);\n }\n catch (_b) {\n // Ignore invalid override values here and let native APIs validate later.\n }\n }\n return Object.assign(Object.assign({}, configuration), { domains: [...domains], origin });\n}\nasync function loadConfiguration() {\n try {\n const configuration = await NativeCapacitorPasskey.getConfiguration();\n cachedConfiguration = configuration;\n return configuration;\n }\n catch (error) {\n configurationPromise = undefined;\n throw error;\n }\n}\nconst CapacitorPasskey = {\n async autoShimWebAuthn(options) {\n const configuration = await CapacitorPasskey.getConfiguration();\n if (!configuration.autoShim && !(options === null || options === void 0 ? void 0 : options.force)) {\n return configuration;\n }\n const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);\n cachedConfiguration = effectiveConfiguration;\n installWebAuthnShim({\n options: mergeShimOptions(effectiveConfiguration, options),\n plugin: CapacitorPasskey,\n });\n return effectiveConfiguration;\n },\n async createCredential(options) {\n return NativeCapacitorPasskey.createCredential(createNativeRequest(options));\n },\n async getConfiguration() {\n if (!configurationPromise) {\n configurationPromise = loadConfiguration();\n }\n return configurationPromise;\n },\n async getCredential(options) {\n return NativeCapacitorPasskey.getCredential(createNativeRequest(options));\n },\n async getPluginVersion() {\n return NativeCapacitorPasskey.getPluginVersion();\n },\n async isSupported() {\n return NativeCapacitorPasskey.isSupported();\n },\n shimWebAuthn(options) {\n installWebAuthnShim({\n options: mergeShimOptions(cachedConfiguration, options),\n plugin: CapacitorPasskey,\n });\n },\n};\nexport * from './definitions';\nexport { CapacitorPasskey };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { browserAuthenticationToJSON, browserCreationOptionsFromJSON, browserRegistrationToJSON, browserRequestOptionsFromJSON, createPasskeyDomException, } from './webauthn';\nexport class CapacitorPasskeyWeb extends WebPlugin {\n async createCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.create({\n publicKey: browserCreationOptionsFromJSON(parsed),\n });\n return browserRegistrationToJSON(credential);\n }\n async getCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.get({\n publicKey: browserRequestOptionsFromJSON(parsed),\n });\n return browserAuthenticationToJSON(credential);\n }\n async getConfiguration() {\n const origin = this.currentOrigin();\n const domains = origin ? [new URL(origin).hostname] : [];\n return {\n autoShim: true,\n domains,\n origin,\n platform: 'web',\n };\n }\n async isSupported() {\n var _a, _b, _c, _d;\n const available = typeof globalThis.PublicKeyCredential !== 'undefined' &&\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) === 'function' &&\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) === 'function';\n let conditionalMediation = false;\n if (available && typeof globalThis.PublicKeyCredential.isConditionalMediationAvailable === 'function') {\n conditionalMediation = await globalThis.PublicKeyCredential.isConditionalMediationAvailable();\n }\n return {\n available,\n conditionalMediation,\n platform: 'web',\n };\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n ensureCredentials() {\n var _a, _b, _c, _d;\n if (typeof globalThis.PublicKeyCredential === 'undefined' ||\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) !== 'function' ||\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) !== 'function') {\n throw createPasskeyDomException('NotSupportedError', 'WebAuthn is not available in this browser.');\n }\n return globalThis.navigator.credentials;\n }\n currentOrigin() {\n if (typeof globalThis.location === 'undefined') {\n return undefined;\n }\n if (globalThis.location.protocol !== 'http:' && globalThis.location.protocol !== 'https:') {\n return undefined;\n }\n return globalThis.location.origin;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAAA,MAAM,YAAY,GAAG,YAAY;IAC1B,SAAS,mBAAmB,CAAC,OAAO,EAAE;IAC7C,IAAI,IAAI,WAAW,IAAI,OAAO,EAAE;IAChC,QAAQ,MAAM,UAAU,GAAG,OAAO;IAClC,QAAQ,OAAO;IACf,YAAY,MAAM,EAAE,aAAa,CAAC,UAAU,CAAC,MAAM,EAAE,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC;IAC/E,YAAY,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,2BAA2B,CAAC,UAAU,CAAC,SAAS,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAC7G,SAAS;IACT,IAAI;IAC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E,GAAG,UAAU,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE;IACxK,YAAY,MAAM,yBAAyB,CAAC,mBAAmB,EAAE,4CAA4C,CAAC;IAC9G,QAAQ;IACR,QAAQ,OAAO,UAAU,CAAC,SAAS,CAAC,WAAW;IAC/C,IAAI;IACJ,IAAI,aAAa,GAAG;IACpB,QAAQ,IAAI,OAAO,UAAU,CAAC,QAAQ,KAAK,WAAW,EAAE;IACxD,YAAY,OAAO,SAAS;IAC5B,QAAQ;IACR,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,EAAE;IACnG,YAAY,OAAO,SAAS;IAC5B,QAAQ;IACR,QAAQ,OAAO,UAAU,CAAC,QAAQ,CAAC,MAAM;IACzC,IAAI;IACJ;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"plugin.js","sources":["esm/webauthn.js","esm/shim.js","esm/index.js","esm/web.js"],"sourcesContent":["const PASSKEY_TYPE = 'public-key';\nexport function createNativeRequest(options) {\n if ('mediation' in options) {\n const getOptions = options;\n return {\n origin: resolveOrigin(getOptions.origin, getOptions.publicKey.rpId),\n requestJson: JSON.stringify(normalizeRequestOptionsJSON(getOptions.publicKey, getOptions.origin)),\n };\n }\n const createOptions = options;\n return {\n origin: resolveOrigin(createOptions.origin, createOptions.publicKey.rp.id),\n requestJson: JSON.stringify(normalizeCreationOptionsJSON(createOptions.publicKey, createOptions.origin)),\n };\n}\nexport function webAuthnCreationOptionsToJSON(options, origin) {\n var _a;\n return normalizeCreationOptionsJSON({\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: encodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => ({\n alg: entry.alg,\n type: entry.type,\n })),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: options.user.displayName,\n id: encodeBase64Url(options.user.id),\n name: options.user.name,\n },\n }, origin);\n}\nexport function webAuthnRequestOptionsToJSON(options, origin) {\n var _a;\n return normalizeRequestOptionsJSON({\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(descriptorToJSON),\n challenge: encodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n }, origin);\n}\nexport function normalizeCreationOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rp.id) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rp.id));\n if (!rpId) {\n throw createPasskeyDomException('DataError', 'A relying party id or HTTPS origin is required.');\n }\n return Object.assign(Object.assign({}, options), { excludeCredentials: (_b = options.excludeCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }), rp: Object.assign(Object.assign({}, options.rp), { id: rpId }) });\n}\nexport function normalizeRequestOptionsJSON(options, origin) {\n var _a, _b;\n const rpId = (_a = options.rpId) !== null && _a !== void 0 ? _a : deriveRpId(resolveOrigin(origin, options.rpId));\n return Object.assign(Object.assign({}, options), { allowCredentials: (_b = options.allowCredentials) === null || _b === void 0 ? void 0 : _b.map(descriptorToJSON), rpId });\n}\nexport function browserCreationOptionsFromJSON(options) {\n var _a, _b;\n return {\n attestation: options.attestation,\n authenticatorSelection: options.authenticatorSelection\n ? {\n authenticatorAttachment: options.authenticatorSelection.authenticatorAttachment,\n requireResidentKey: options.authenticatorSelection.requireResidentKey,\n residentKey: options.authenticatorSelection.residentKey,\n userVerification: options.authenticatorSelection.userVerification,\n }\n : undefined,\n challenge: decodeBase64Url(options.challenge),\n excludeCredentials: (_a = options.excludeCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n extensions: cloneExtensions(options.extensions),\n pubKeyCredParams: options.pubKeyCredParams.map((entry) => {\n var _a;\n return ({\n alg: entry.alg,\n type: (_a = entry.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n });\n }),\n rp: {\n id: options.rp.id,\n name: options.rp.name,\n },\n timeout: options.timeout,\n user: {\n displayName: (_b = options.user.displayName) !== null && _b !== void 0 ? _b : options.user.name,\n id: decodeBase64Url(options.user.id),\n name: options.user.name,\n },\n };\n}\nexport function browserRequestOptionsFromJSON(options) {\n var _a;\n return {\n allowCredentials: (_a = options.allowCredentials) === null || _a === void 0 ? void 0 : _a.map(jsonDescriptorToBrowser),\n challenge: decodeBase64Url(options.challenge),\n extensions: cloneExtensions(options.extensions),\n rpId: options.rpId,\n timeout: options.timeout,\n userVerification: options.userVerification,\n };\n}\nexport async function browserRegistrationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'registration');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'attestationObject' in nativeJson.response) {\n return normalizeRegistrationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n attestationObject: encodeBase64Url(response.attestationObject),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n publicKey: response.getPublicKey ? nullableBufferToOptionalBase64Url(response.getPublicKey()) : undefined,\n publicKeyAlgorithm: response.getPublicKeyAlgorithm ? response.getPublicKeyAlgorithm() : undefined,\n transports: response.getTransports ? response.getTransports() : undefined,\n },\n type: PASSKEY_TYPE,\n };\n}\nexport async function browserAuthenticationToJSON(credential) {\n var _a;\n const publicKeyCredential = expectPublicKeyCredential(credential, 'authentication');\n const response = publicKeyCredential.response;\n const nativeJson = credentialWithToJSON(publicKeyCredential);\n if (nativeJson && 'authenticatorData' in nativeJson.response) {\n return normalizeAuthenticationCredential(nativeJson);\n }\n return {\n authenticatorAttachment: normalizeAttachment(publicKeyCredential.authenticatorAttachment),\n clientExtensionResults: clientExtensionResultsToRecord((_a = publicKeyCredential.getClientExtensionResults) === null || _a === void 0 ? void 0 : _a.call(publicKeyCredential)),\n id: publicKeyCredential.id,\n rawId: encodeBase64Url(publicKeyCredential.rawId),\n response: {\n authenticatorData: encodeBase64Url(response.authenticatorData),\n clientDataJSON: encodeBase64Url(response.clientDataJSON),\n signature: encodeBase64Url(response.signature),\n userHandle: nullableBufferToBase64Url(response.userHandle),\n },\n type: PASSKEY_TYPE,\n };\n}\nexport function credentialFromJSON(credential) {\n const shimCredential = new PasskeyPublicKeyCredential(credential);\n if (typeof globalThis.PublicKeyCredential === 'function') {\n Object.setPrototypeOf(shimCredential, globalThis.PublicKeyCredential.prototype);\n }\n return shimCredential;\n}\nexport function parseCreationOptionsFromJSON(options) {\n return browserCreationOptionsFromJSON(normalizeCreationOptionsJSON(options));\n}\nexport function parseRequestOptionsFromJSON(options) {\n return browserRequestOptionsFromJSON(normalizeRequestOptionsJSON(options));\n}\nexport function decodeBase64Url(value) {\n const bytes = base64UrlToBytes(value);\n return bytes.slice().buffer;\n}\nexport function encodeBase64Url(value) {\n if (typeof value === 'undefined' || value === null) {\n return '';\n }\n const bytes = toUint8Array(value);\n let binary = '';\n bytes.forEach((byte) => {\n binary += String.fromCharCode(byte);\n });\n return btoa(binary).replace(/\\+/g, '-').replace(/\\//g, '_').replace(/=+$/u, '');\n}\nexport function resolveOrigin(explicitOrigin, rpId) {\n if (explicitOrigin) {\n return explicitOrigin;\n }\n if (typeof globalThis.location !== 'undefined' && /^https?:$/u.test(globalThis.location.protocol)) {\n return globalThis.location.origin;\n }\n if (rpId) {\n return `https://${rpId}`;\n }\n return undefined;\n}\nexport function createPasskeyDomException(name, message) {\n if (typeof DOMException !== 'undefined') {\n return new DOMException(message, name);\n }\n const error = new Error(message);\n error.name = name;\n return error;\n}\nexport function abortIfNeeded(signal) {\n if (signal === null || signal === void 0 ? void 0 : signal.aborted) {\n throw createPasskeyDomException('AbortError', 'The passkey request was aborted.');\n }\n}\nexport function normalizePluginError(error) {\n if (error instanceof Error) {\n return error;\n }\n const message = typeof error === 'object' && error && 'message' in error ? String(error.message) : String(error);\n const name = resolveErrorName(error);\n return createPasskeyDomException(name, message);\n}\nfunction credentialWithToJSON(credential) {\n const toJSON = credential.toJSON;\n if (typeof toJSON !== 'function') {\n return null;\n }\n const json = toJSON();\n if (!json || typeof json !== 'object') {\n return null;\n }\n const response = json.response;\n if (!response) {\n return null;\n }\n if ('attestationObject' in response) {\n return normalizeRegistrationCredential(json);\n }\n if ('authenticatorData' in response) {\n return normalizeAuthenticationCredential(json);\n }\n return null;\n}\nfunction normalizeRegistrationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAttestationResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAuthenticationCredential(credential) {\n var _a, _b, _c, _d, _e;\n return {\n authenticatorAttachment: normalizeAttachment(credential.authenticatorAttachment),\n clientExtensionResults: (_a = credential.clientExtensionResults) !== null && _a !== void 0 ? _a : {},\n id: String((_b = credential.id) !== null && _b !== void 0 ? _b : ''),\n rawId: String((_d = (_c = credential.rawId) !== null && _c !== void 0 ? _c : credential.id) !== null && _d !== void 0 ? _d : ''),\n response: normalizeAssertionResponse((_e = credential.response) !== null && _e !== void 0 ? _e : {}),\n type: PASSKEY_TYPE,\n };\n}\nfunction normalizeAttestationResponse(response) {\n var _a, _b;\n return {\n attestationObject: String((_a = response.attestationObject) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n publicKey: response.publicKey,\n publicKeyAlgorithm: response.publicKeyAlgorithm,\n transports: response.transports,\n };\n}\nfunction normalizeAssertionResponse(response) {\n var _a, _b, _c;\n return {\n authenticatorData: String((_a = response.authenticatorData) !== null && _a !== void 0 ? _a : ''),\n clientDataJSON: String((_b = response.clientDataJSON) !== null && _b !== void 0 ? _b : ''),\n signature: String((_c = response.signature) !== null && _c !== void 0 ? _c : ''),\n userHandle: typeof response.userHandle === 'undefined' ? null : response.userHandle,\n };\n}\nfunction expectPublicKeyCredential(credential, flow) {\n if (!credential || !(credential instanceof PublicKeyCredential)) {\n throw createPasskeyDomException('InvalidStateError', `The browser did not return a ${flow} credential.`);\n }\n return credential;\n}\nfunction descriptorToJSON(descriptor) {\n var _a;\n return {\n id: typeof descriptor.id === 'string' ? descriptor.id : encodeBase64Url(descriptor.id),\n transports: descriptor.transports ? [...descriptor.transports] : undefined,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction jsonDescriptorToBrowser(descriptor) {\n var _a;\n return {\n id: decodeBase64Url(descriptor.id),\n transports: descriptor.transports,\n type: (_a = descriptor.type) !== null && _a !== void 0 ? _a : PASSKEY_TYPE,\n };\n}\nfunction cloneExtensions(extensions) {\n if (!extensions) {\n return undefined;\n }\n return JSON.parse(JSON.stringify(extensions));\n}\nfunction nullableBufferToBase64Url(value) {\n if (typeof value === 'undefined') {\n return undefined;\n }\n if (value === null) {\n return null;\n }\n return encodeBase64Url(value);\n}\nfunction nullableBufferToOptionalBase64Url(value) {\n const encoded = nullableBufferToBase64Url(value);\n return encoded !== null && encoded !== void 0 ? encoded : undefined;\n}\nfunction deriveRpId(origin) {\n if (!origin) {\n return undefined;\n }\n try {\n return new URL(origin).hostname;\n }\n catch (_a) {\n return undefined;\n }\n}\nfunction base64UrlToBytes(value) {\n const normalized = value.replace(/-/g, '+').replace(/_/g, '/');\n const padding = normalized.length % 4 === 0 ? '' : '='.repeat(4 - (normalized.length % 4));\n const binary = atob(`${normalized}${padding}`);\n const bytes = new Uint8Array(binary.length);\n for (let index = 0; index < binary.length; index += 1) {\n bytes[index] = binary.charCodeAt(index);\n }\n return bytes;\n}\nfunction toUint8Array(value) {\n if (Array.isArray(value)) {\n return Uint8Array.from(value);\n }\n if (ArrayBuffer.isView(value)) {\n return new Uint8Array(value.buffer, value.byteOffset, value.byteLength);\n }\n return new Uint8Array(value);\n}\nfunction normalizeAttachment(value) {\n if (value === 'platform' || value === 'cross-platform') {\n return value;\n }\n return undefined;\n}\nfunction clientExtensionResultsToRecord(value) {\n if (!value) {\n return {};\n }\n return JSON.parse(JSON.stringify(value));\n}\nclass PasskeyAuthenticatorAttestationResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.attestationObject = decodeBase64Url(json.attestationObject);\n }\n getPublicKey() {\n return this.json.publicKey ? decodeBase64Url(this.json.publicKey) : null;\n }\n getPublicKeyAlgorithm() {\n var _a;\n return (_a = this.json.publicKeyAlgorithm) !== null && _a !== void 0 ? _a : -7;\n }\n getTransports() {\n return this.json.transports ? [...this.json.transports] : [];\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyAuthenticatorAssertionResponse {\n constructor(json) {\n this.json = json;\n this.clientDataJSON = decodeBase64Url(json.clientDataJSON);\n this.authenticatorData = decodeBase64Url(json.authenticatorData);\n this.signature = decodeBase64Url(json.signature);\n this.userHandle = json.userHandle ? decodeBase64Url(json.userHandle) : null;\n }\n toJSON() {\n return Object.assign({}, this.json);\n }\n}\nclass PasskeyPublicKeyCredential {\n constructor(json) {\n var _a;\n this.json = json;\n this.type = PASSKEY_TYPE;\n this.id = json.id;\n this.rawId = decodeBase64Url(json.rawId);\n this.authenticatorAttachment = (_a = json.authenticatorAttachment) !== null && _a !== void 0 ? _a : null;\n this.response =\n 'attestationObject' in json.response\n ? new PasskeyAuthenticatorAttestationResponse(json.response)\n : new PasskeyAuthenticatorAssertionResponse(json.response);\n }\n getClientExtensionResults() {\n var _a;\n return ((_a = this.json.clientExtensionResults) !== null && _a !== void 0 ? _a : {});\n }\n toJSON() {\n return JSON.parse(JSON.stringify(this.json));\n }\n}\nfunction resolveErrorName(error) {\n if (typeof error === 'object' && error) {\n if ('code' in error && typeof error.code === 'string') {\n return error.code;\n }\n if ('data' in error && error.data && typeof error.data === 'object' && 'name' in error.data) {\n const candidate = error.data.name;\n if (typeof candidate === 'string') {\n return candidate;\n }\n }\n }\n return 'UnknownError';\n}\n//# sourceMappingURL=webauthn.js.map","import { abortIfNeeded, createPasskeyDomException, credentialFromJSON, normalizePluginError, parseCreationOptionsFromJSON, parseRequestOptionsFromJSON, webAuthnCreationOptionsToJSON, webAuthnRequestOptionsToJSON, } from './webauthn';\nexport function installWebAuthnShim({ root = globalThis, plugin, options }) {\n var _a;\n const shimRoot = root;\n const config = Object.assign(Object.assign({}, ((_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {})), (options !== null && options !== void 0 ? options : {}));\n shimRoot.__capgoPasskeyShimConfig = config;\n if (shimRoot.__capgoPasskeyShimInstalled && !config.force) {\n return;\n }\n const originalCredentials = shimRoot.navigator.credentials;\n const patchedCredentials = {\n create: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.create) {\n return originalCredentials.create.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential creation is supported.');\n }\n abortIfNeeded(request.signal);\n const response = (await plugin.createCredential({\n origin: currentConfig.origin,\n publicKey: webAuthnCreationOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n get: async (request) => {\n var _a;\n const currentConfig = (_a = shimRoot.__capgoPasskeyShimConfig) !== null && _a !== void 0 ? _a : {};\n if (!(request === null || request === void 0 ? void 0 : request.publicKey)) {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.get) {\n return originalCredentials.get.call(originalCredentials, request);\n }\n throw createPasskeyDomException('NotSupportedError', 'Only public-key credential requests are supported.');\n }\n abortIfNeeded(request.signal);\n if (request.mediation === 'conditional') {\n throw createPasskeyDomException('NotSupportedError', 'Conditional mediation is not available through the Capacitor passkey shim.');\n }\n const response = (await plugin.getCredential({\n mediation: request.mediation,\n origin: currentConfig.origin,\n publicKey: webAuthnRequestOptionsToJSON(request.publicKey, currentConfig.origin),\n }));\n return credentialFromJSON(response);\n },\n preventSilentAccess: async () => {\n if (originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.preventSilentAccess) {\n await originalCredentials.preventSilentAccess.call(originalCredentials);\n }\n },\n store: async (credential) => {\n if ((originalCredentials === null || originalCredentials === void 0 ? void 0 : originalCredentials.store) && credential) {\n await originalCredentials.store.call(originalCredentials, credential);\n }\n },\n };\n try {\n Object.defineProperty(shimRoot.navigator, 'credentials', {\n configurable: true,\n value: patchedCredentials,\n writable: false,\n });\n }\n catch (_b) {\n shimRoot.navigator.credentials = patchedCredentials;\n }\n installPublicKeyCredentialStatics(shimRoot, plugin);\n shimRoot.__capgoPasskeyShimInstalled = true;\n}\nfunction installPublicKeyCredentialStatics(root, plugin) {\n var _a;\n const nativePublicKeyCredential = (_a = root.PublicKeyCredential) !== null && _a !== void 0 ? _a : class {\n };\n const supportRequest = async () => {\n try {\n return await plugin.isSupported();\n }\n catch (error) {\n throw normalizePluginError(error);\n }\n };\n defineStatic(nativePublicKeyCredential, 'isUserVerifyingPlatformAuthenticatorAvailable', async () => {\n const support = await supportRequest();\n return support.available;\n });\n defineStatic(nativePublicKeyCredential, 'isConditionalMediationAvailable', async () => {\n const support = await supportRequest();\n return support.conditionalMediation;\n });\n defineStatic(nativePublicKeyCredential, 'parseCreationOptionsFromJSON', parseCreationOptionsFromJSON);\n defineStatic(nativePublicKeyCredential, 'parseRequestOptionsFromJSON', parseRequestOptionsFromJSON);\n root.PublicKeyCredential = nativePublicKeyCredential;\n}\nfunction defineStatic(target, key, value) {\n try {\n Object.defineProperty(target, key, {\n configurable: true,\n value,\n writable: true,\n });\n }\n catch (_a) {\n Reflect.set(target, key, value);\n }\n}\n//# sourceMappingURL=shim.js.map","import { registerPlugin } from '@capacitor/core';\nimport { installWebAuthnShim } from './shim';\nimport { createNativeRequest } from './webauthn';\nconst NativeCapacitorPasskey = registerPlugin('CapacitorPasskey', {\n web: () => import('./web').then((module) => new module.CapacitorPasskeyWeb()),\n});\nlet configurationPromise;\nlet cachedConfiguration;\nfunction mergeShimOptions(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration === null || configuration === void 0 ? void 0 : configuration.origin;\n const force = options === null || options === void 0 ? void 0 : options.force;\n if (!origin && force === undefined) {\n return undefined;\n }\n return {\n force,\n origin,\n };\n}\nfunction mergeRuntimeConfiguration(configuration, options) {\n var _a;\n const origin = (_a = options === null || options === void 0 ? void 0 : options.origin) !== null && _a !== void 0 ? _a : configuration.origin;\n const domains = new Set(configuration.domains);\n if (origin) {\n try {\n domains.add(new URL(origin).hostname);\n }\n catch (_b) {\n // Ignore invalid override values here and let native APIs validate later.\n }\n }\n return Object.assign(Object.assign({}, configuration), { domains: [...domains], origin });\n}\nasync function loadConfiguration() {\n try {\n const configuration = await NativeCapacitorPasskey.getConfiguration();\n cachedConfiguration = configuration;\n return configuration;\n }\n catch (error) {\n configurationPromise = undefined;\n throw error;\n }\n}\nconst CapacitorPasskey = {\n async autoShimWebAuthn(options) {\n const configuration = await CapacitorPasskey.getConfiguration();\n const effectiveConfiguration = mergeRuntimeConfiguration(configuration, options);\n cachedConfiguration = effectiveConfiguration;\n installWebAuthnShim({\n options: mergeShimOptions(effectiveConfiguration, options),\n plugin: CapacitorPasskey,\n });\n return effectiveConfiguration;\n },\n async createCredential(options) {\n return NativeCapacitorPasskey.createCredential(createNativeRequest(options));\n },\n async getConfiguration() {\n if (!configurationPromise) {\n configurationPromise = loadConfiguration();\n }\n return configurationPromise;\n },\n async getCredential(options) {\n return NativeCapacitorPasskey.getCredential(createNativeRequest(options));\n },\n async getPluginVersion() {\n return NativeCapacitorPasskey.getPluginVersion();\n },\n async isSupported() {\n return NativeCapacitorPasskey.isSupported();\n },\n shimWebAuthn(options) {\n installWebAuthnShim({\n options: mergeShimOptions(cachedConfiguration, options),\n plugin: CapacitorPasskey,\n });\n },\n};\nexport * from './definitions';\nexport { CapacitorPasskey };\n//# sourceMappingURL=index.js.map","import { WebPlugin } from '@capacitor/core';\nimport { browserAuthenticationToJSON, browserCreationOptionsFromJSON, browserRegistrationToJSON, browserRequestOptionsFromJSON, createPasskeyDomException, } from './webauthn';\nexport class CapacitorPasskeyWeb extends WebPlugin {\n async createCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.create({\n publicKey: browserCreationOptionsFromJSON(parsed),\n });\n return browserRegistrationToJSON(credential);\n }\n async getCredential(options) {\n const credentials = this.ensureCredentials();\n const parsed = JSON.parse(options.requestJson);\n const credential = await credentials.get({\n publicKey: browserRequestOptionsFromJSON(parsed),\n });\n return browserAuthenticationToJSON(credential);\n }\n async getConfiguration() {\n const origin = this.currentOrigin();\n const domains = origin ? [new URL(origin).hostname] : [];\n return {\n autoShim: true,\n domains,\n origin,\n platform: 'web',\n };\n }\n async isSupported() {\n var _a, _b, _c, _d;\n const available = typeof globalThis.PublicKeyCredential !== 'undefined' &&\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) === 'function' &&\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) === 'function';\n let conditionalMediation = false;\n if (available && typeof globalThis.PublicKeyCredential.isConditionalMediationAvailable === 'function') {\n conditionalMediation = await globalThis.PublicKeyCredential.isConditionalMediationAvailable();\n }\n return {\n available,\n conditionalMediation,\n platform: 'web',\n };\n }\n async getPluginVersion() {\n return {\n version: 'web',\n };\n }\n ensureCredentials() {\n var _a, _b, _c, _d;\n if (typeof globalThis.PublicKeyCredential === 'undefined' ||\n typeof ((_b = (_a = globalThis.navigator) === null || _a === void 0 ? void 0 : _a.credentials) === null || _b === void 0 ? void 0 : _b.create) !== 'function' ||\n typeof ((_d = (_c = globalThis.navigator) === null || _c === void 0 ? void 0 : _c.credentials) === null || _d === void 0 ? void 0 : _d.get) !== 'function') {\n throw createPasskeyDomException('NotSupportedError', 'WebAuthn is not available in this browser.');\n }\n return globalThis.navigator.credentials;\n }\n currentOrigin() {\n if (typeof globalThis.location === 'undefined') {\n return undefined;\n }\n if (globalThis.location.protocol !== 'http:' && globalThis.location.protocol !== 'https:') {\n return undefined;\n }\n return globalThis.location.origin;\n }\n}\n//# sourceMappingURL=web.js.map"],"names":["registerPlugin","WebPlugin"],"mappings":";;;IAAA,MAAM,YAAY,GAAG,YAAY;IAC1B,SAAS,mBAAmB,CAAC,OAAO,EAAE;IAC7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,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,UAAU;IACzK,YAAY,QAAQ,CAAC,EAAE,GAAG,CAAC,EAAE,GAAG,UAAU,CAAC,SAAS,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,WAAW,MAAM,IAAI,IAAI,EAAE,KAAK,MAAM,GAAG,MAAM,GAAG,EAAE,CAAC,GAAG,CAAC,KAAK,UAAU,EAAE;IACxK,YAAY,MAAM,yBAAyB,CAAC,mBAAmB,EAAE,4CAA4C,CAAC;IAC9G,QAAQ;IACR,QAAQ,OAAO,UAAU,CAAC,SAAS,CAAC,WAAW;IAC/C,IAAI;IACJ,IAAI,aAAa,GAAG;IACpB,QAAQ,IAAI,OAAO,UAAU,CAAC,QAAQ,KAAK,WAAW,EAAE;IACxD,YAAY,OAAO,SAAS;IAC5B,QAAQ;IACR,QAAQ,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,OAAO,IAAI,UAAU,CAAC,QAAQ,CAAC,QAAQ,KAAK,QAAQ,EAAE;IACnG,YAAY,OAAO,SAAS;IAC5B,QAAQ;IACR,QAAQ,OAAO,UAAU,CAAC,QAAQ,CAAC,MAAM;IACzC,IAAI;IACJ;;;;;;;;;;;;;;;"}
package/package.json CHANGED
@@ -1,24 +1,11 @@
1
1
  {
2
2
  "name": "@capgo/capacitor-passkey",
3
- "version": "8.2.1",
3
+ "version": "8.2.3",
4
4
  "description": "Capacitor passkey plugin with a WebAuthn-style shim for Capacitor apps.",
5
5
  "main": "dist/plugin.cjs.js",
6
6
  "module": "dist/esm/index.js",
7
7
  "types": "dist/esm/index.d.ts",
8
8
  "unpkg": "dist/plugin.js",
9
- "exports": {
10
- ".": {
11
- "types": "./dist/esm/index.d.ts",
12
- "import": "./dist/esm/index.js",
13
- "require": "./dist/plugin.cjs.js",
14
- "default": "./dist/esm/index.js"
15
- },
16
- "./auto": {
17
- "types": "./dist/esm/auto.d.ts",
18
- "import": "./dist/esm/auto.js",
19
- "default": "./dist/esm/auto.js"
20
- }
21
- },
22
9
  "files": [
23
10
  "android/src/main/",
24
11
  "android/build.gradle",
@@ -222,7 +222,7 @@ function upsertAssociatedDomains(content, webCredentialEntries) {
222
222
  const preserved = parsed.items.filter((item) => !item.startsWith('webcredentials:'));
223
223
  const merged = [...preserved, ...webCredentialSet];
224
224
  const nextBlock = buildAssociatedDomainsBlock(parsed.indent, merged);
225
- return content.replace(parsed.fullMatch, nextBlock);
225
+ return content.replace(parsed.fullMatch, nextBlock.replace(/\n$/, ''));
226
226
  }
227
227
 
228
228
  if (webCredentialEntries.length === 0) {