@transmitsecurity/platform-web-sdk 1.16.1 → 1.17.0

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.
Files changed (77) hide show
  1. package/CHANGELOG.md +10 -2
  2. package/README.md +69 -41
  3. package/dist/drs.cjs +1 -1
  4. package/dist/drs.d.ts +1 -14
  5. package/dist/drs.js +1 -1
  6. package/dist/ido.cjs +2 -2
  7. package/dist/ido.d.ts +889 -6
  8. package/dist/ido.js +1 -1
  9. package/dist/idv.cjs +1 -1
  10. package/dist/idv.d.ts +1 -7
  11. package/dist/idv.js +1 -1
  12. package/dist/index.cjs +2 -2
  13. package/dist/index.esm.js +2 -2
  14. package/dist/index.umd.js +2 -2
  15. package/dist/ts-platform-websdk.js +2 -2
  16. package/dist/web-sdk-drs+idv+webauthn+ido.js +2 -2
  17. package/dist/web-sdk.d.ts +1 -1
  18. package/dist/webauthn.cjs +1 -1
  19. package/dist/webauthn.d.ts +1 -9
  20. package/dist/webauthn.js +1 -1
  21. package/package.json +13 -13
  22. package/build/drs-entry.d.ts +0 -20
  23. package/build/drs-entry.js +0 -19
  24. package/build/drs-only.d.ts +0 -22
  25. package/build/drs-only.js +0 -25
  26. package/build/drs.d.ts +0 -13
  27. package/build/drs.js +0 -45
  28. package/build/ido/idoImpl.d.ts +0 -2
  29. package/build/ido/idoImpl.js +0 -4
  30. package/build/ido/index.d.ts +0 -7
  31. package/build/ido/index.js +0 -9
  32. package/build/ido-entry.d.ts +0 -17
  33. package/build/ido-entry.js +0 -19
  34. package/build/ido.d.ts +0 -8
  35. package/build/ido.js +0 -27
  36. package/build/idv-entry.d.ts +0 -17
  37. package/build/idv-entry.js +0 -19
  38. package/build/idv.d.ts +0 -8
  39. package/build/idv.js +0 -27
  40. package/build/initialize-only.d.ts +0 -7
  41. package/build/initialize-only.js +0 -40
  42. package/build/initialize.d.ts +0 -1
  43. package/build/initialize.js +0 -2
  44. package/build/mainExport.d.ts +0 -16
  45. package/build/mainExport.js +0 -43
  46. package/build/sdk-factory.d.ts +0 -109
  47. package/build/sdk-factory.js +0 -108
  48. package/build/shared-state.d.ts +0 -4
  49. package/build/shared-state.js +0 -32
  50. package/build/webauthn-entry.d.ts +0 -19
  51. package/build/webauthn-entry.js +0 -19
  52. package/build/webauthn.d.ts +0 -12
  53. package/build/webauthn.js +0 -44
  54. package/bundler-config.json +0 -14
  55. package/dist/docs/.nojekyll +0 -1
  56. package/dist/docs/README.md +0 -72
  57. package/dist/docs/enums/ErrorCode.md +0 -113
  58. package/dist/docs/interfaces/ActionEventOptions.md +0 -44
  59. package/dist/docs/interfaces/ActionResponse.md +0 -9
  60. package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +0 -61
  61. package/dist/docs/interfaces/AutofillHandlers.md +0 -50
  62. package/dist/docs/interfaces/CrossDeviceController.md +0 -27
  63. package/dist/docs/interfaces/SdkError.md +0 -28
  64. package/dist/docs/interfaces/WebauthnApis.md +0 -73
  65. package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +0 -52
  66. package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +0 -107
  67. package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +0 -23
  68. package/dist/docs/interfaces/WebauthnRegistrationOptions.md +0 -55
  69. package/dist/docs/interfaces/initConfigParams.md +0 -7
  70. package/dist/docs/modules/drs.md +0 -92
  71. package/dist/docs/modules/idv.md +0 -106
  72. package/dist/docs/modules/webauthn.md +0 -197
  73. package/dist/docs/modules.md +0 -146
  74. package/scripts/make-semver-aliases.sh +0 -11
  75. package/scripts/upload-dist.sh +0 -9
  76. package/src/mainExport.ts +0 -75
  77. package/src/tsconfig.json +0 -14
@@ -1,14 +0,0 @@
1
- {
2
- "exports": {
3
- "drs": "@transmit-security/riskid_sdk",
4
- "idv": "@transmit-security/ts-identity-verification",
5
- "webauthn": "@transmit-security/authentication-sdk",
6
- "ido": "@transmit-security/ido-web-sdk"
7
- },
8
- "exportsFromDefault": {},
9
- "mainExport": "./build/mainExport",
10
- "declarations": true,
11
- "docs": true,
12
- "minify": true,
13
- "legacyBrowsers": true
14
- }
@@ -1 +0,0 @@
1
- TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
@@ -1,72 +0,0 @@
1
- # Transmit Security Platform Web SDK
2
-
3
- A comprehensive browser-based identity and security solution with fraud prevention, WebAuthn authentication, identity verification, and orchestration capabilities.
4
-
5
- ## Installation
6
-
7
- ```bash
8
- npm install @transmitsecurity/platform-web-sdk
9
- ```
10
-
11
- ## Quick Start
12
-
13
- ### Recommended Usage (Full SDK Import)
14
-
15
- ```js
16
- import { drs, webauthn, idv, ido, initialize } from '@transmitsecurity/platform-web-sdk';
17
-
18
- // Single initialize call for all modules
19
- await initialize({
20
- clientId: 'your-client-id',
21
- drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
22
- webauthn: { serverPath: 'https://api.transmitsecurity.io' }
23
- });
24
-
25
- // Use the modules
26
- await drs.triggerActionEvent('login', { correlationId: 'example' });
27
- const isSupported = await webauthn.isPlatformAuthenticatorSupported();
28
- ```
29
-
30
- ### Individual Module Imports (Limited Support)
31
-
32
- ⚠️ **Note**: Individual module imports have dependency resolution issues in some bundlers (like Vite). Use full SDK import for better compatibility.
33
-
34
- ```js
35
- // May cause dependency resolution errors in some environments
36
- import { drs, initialize } from '@transmitsecurity/platform-web-sdk/drs';
37
- import { webauthn } from '@transmitsecurity/platform-web-sdk/webauthn';
38
-
39
- // Single initialize call
40
- await initialize({
41
- clientId: 'your-client-id',
42
- drs: { serverPath: 'https://api.transmitsecurity.io/risk-collect/' },
43
- webauthn: { serverPath: 'https://api.transmitsecurity.io' }
44
- });
45
- ```
46
-
47
- ## Bundle Size
48
-
49
- The SDK is optimized for production use:
50
- - **Gzipped**: ~180KB
51
- - **Uncompressed**: ~565KB
52
- - **Tree-shaking**: Modern bundlers eliminate unused code automatically
53
-
54
- ## Troubleshooting
55
-
56
- ### Vite Dependency Resolution Errors
57
-
58
- If you encounter errors like "Could not resolve @transmit-security/web-sdk-common", see [VITE_CONFIG.md](./VITE_CONFIG.md) for detailed solutions.
59
-
60
- **Quick fix**: Use the full SDK import instead of individual module imports.
61
-
62
- ### Other Bundlers
63
-
64
- For webpack, Rollup, or other bundlers, the full SDK import should work without additional configuration.
65
-
66
- ## Documentation
67
-
68
- For complete documentation, visit: https://github.com/transmitsecurity-dev/ciam-web-sdk
69
-
70
- ## License
71
-
72
- SEE LICENSE IN LICENSE
@@ -1,113 +0,0 @@
1
- # Enumeration: ErrorCode
2
-
3
- ## Enumeration Members
4
-
5
- ### NotInitialized
6
-
7
- • **NotInitialized** = ``"not_initialized"``
8
-
9
- Either the SDK init call failed or another function was called before initializing the SDK
10
-
11
- ___
12
-
13
- ### AuthenticationFailed
14
-
15
- • **AuthenticationFailed** = ``"authentication_failed"``
16
-
17
- When the call to [startAuthentication](../interfaces/WebauthnApis.md#startauthentication) failed
18
-
19
- ___
20
-
21
- ### AuthenticationAbortedTimeout
22
-
23
- • **AuthenticationAbortedTimeout** = ``"authentication_aborted_timeout"``
24
-
25
- When [authenticate.modal](../interfaces/WebauthnAuthenticationFlows.md#modal) or [authenticate.autofill.activate](../interfaces/AutofillHandlers.md#activate) is called and the modal is closed by the user
26
-
27
- ___
28
-
29
- ### AuthenticationCanceled
30
-
31
- • **AuthenticationCanceled** = ``"webauthn_authentication_canceled"``
32
-
33
- When [register](../modules.md#register) is called and the modal is closed when reaching the timeout
34
-
35
- ___
36
-
37
- ### RegistrationFailed
38
-
39
- • **RegistrationFailed** = ``"registration_failed"``
40
-
41
- When the call to [startRegistration](../interfaces/WebauthnApis.md#startregistration) failed
42
-
43
- ___
44
-
45
- ### AlreadyRegistered
46
-
47
- • **AlreadyRegistered** = ``"username_already_registered"``
48
-
49
- / When The user attempted to register an authenticator that contains one of the credentials already registered with the relying party.
50
-
51
- ___
52
-
53
- ### RegistrationAbortedTimeout
54
-
55
- • **RegistrationAbortedTimeout** = ``"registration_aborted_timeout"``
56
-
57
- When [register](../modules.md#register) is called and the modal is closed by the user
58
-
59
- ___
60
-
61
- ### RegistrationCanceled
62
-
63
- • **RegistrationCanceled** = ``"webauthn_registration_canceled"``
64
-
65
- When [register](../modules.md#register) is called and the modal is closed when reaching the timeout
66
-
67
- ___
68
-
69
- ### AutofillAuthenticationAborted
70
-
71
- • **AutofillAuthenticationAborted** = ``"autofill_authentication_aborted"``
72
-
73
- Passkey autofill authentication was aborted by [abort](../interfaces/AutofillHandlers.md#abort)
74
-
75
- ___
76
-
77
- ### AuthenticationProcessAlreadyActive
78
-
79
- • **AuthenticationProcessAlreadyActive** = ``"authentication_process_already_active"``
80
-
81
- Passkey authentication is already active. To start a new authentication, abort the current one first by calling [abort](../interfaces/AutofillHandlers.md#abort)
82
-
83
- ___
84
-
85
- ### InvalidApprovalData
86
-
87
- • **InvalidApprovalData** = ``"invalid_approval_data"``
88
-
89
- The ApprovalData parameter was sent in the wrong format
90
-
91
- ___
92
-
93
- ### FailedToInitCrossDeviceSession
94
-
95
- • **FailedToInitCrossDeviceSession** = ``"cross_device_init_failed"``
96
-
97
- When the call to [initCrossDeviceAuthentication](../interfaces/WebauthnApis.md#initcrossdeviceauthentication) failed
98
-
99
- ___
100
-
101
- ### FailedToGetCrossDeviceStatus
102
-
103
- • **FailedToGetCrossDeviceStatus** = ``"cross_device_status_failed"``
104
-
105
- When the call to [getCrossDeviceTicketStatus](../interfaces/WebauthnApis.md#getcrossdeviceticketstatus) failed
106
-
107
- ___
108
-
109
- ### Unknown
110
-
111
- • **Unknown** = ``"unknown"``
112
-
113
- When the SDK operation fails on an unhandled error
@@ -1,44 +0,0 @@
1
- # Interface: ActionEventOptions
2
-
3
- ## Properties
4
-
5
- ### correlationId
6
-
7
- • `Optional` **correlationId**: `string`
8
-
9
- Any ID that could help relate the action with external context or session
10
-
11
- ___
12
-
13
- ### claimedUserId
14
-
15
- • `Optional` **claimedUserId**: `string`
16
-
17
- User ID of the not yet authenticated user, used to enhance risk and
18
- trust assessments. Once the user is authenticated,
19
- TSAccountProtection.setAuthenticatedUser should be called.
20
-
21
- ___
22
-
23
- ### claimedUserIdType
24
-
25
- • `Optional` **claimedUserIdType**: `string`
26
-
27
- The reported claimedUserId type (if provided), should not contain PII unless it is hashed.
28
- Supported values: email, phone_number, account_id, ssn, national_id, passport_number, drivers_license_number, other.
29
-
30
- ___
31
-
32
- ### transactionData
33
-
34
- • `Optional` **transactionData**: `TransactionData`
35
-
36
- A transaction data-points object for transaction-monitoring
37
-
38
- ___
39
-
40
- ### customAttributes
41
-
42
- • `Optional` **customAttributes**: `Record`<`string`, `string` \| `number` \| `boolean`\>
43
-
44
- Custom attributes matching the schema previously defined in the Admin Portal
@@ -1,9 +0,0 @@
1
- # Interface: ActionResponse
2
-
3
- ## Properties
4
-
5
- ### actionToken
6
-
7
- • `Optional` **actionToken**: `string`
8
-
9
- The token return by the SDK when the action was reported
@@ -1,61 +0,0 @@
1
- # Interface: AuthenticationAutofillActivateHandlers
2
-
3
- ## Properties
4
-
5
- ### onSuccess
6
-
7
- • **onSuccess**: (`webauthn_encoded_result`: `string`) => `Promise`<`void`\>
8
-
9
- #### Type declaration
10
-
11
- ▸ (`webauthn_encoded_result`): `Promise`<`void`\>
12
-
13
- A Callback function that will be triggered once biometrics signing is completed successfully.
14
-
15
- ##### Parameters
16
-
17
- | Name | Type |
18
- | :------ | :------ |
19
- | `webauthn_encoded_result` | `string` |
20
-
21
- ##### Returns
22
-
23
- `Promise`<`void`\>
24
-
25
- ___
26
-
27
- ### onError
28
-
29
- • `Optional` **onError**: (`err`: [`SdkError`](SdkError.md)) => `Promise`<`void`\>
30
-
31
- #### Type declaration
32
-
33
- ▸ (`err`): `Promise`<`void`\>
34
-
35
- A Callback function that will be triggered if authentication fails with an SdkError.
36
-
37
- ##### Parameters
38
-
39
- | Name | Type |
40
- | :------ | :------ |
41
- | `err` | [`SdkError`](SdkError.md) |
42
-
43
- ##### Returns
44
-
45
- `Promise`<`void`\>
46
-
47
- ___
48
-
49
- ### onReady
50
-
51
- • `Optional` **onReady**: () => `void`
52
-
53
- #### Type declaration
54
-
55
- ▸ (): `void`
56
-
57
- A Callback function that will be triggered when challenge excepted from the service and autofill is ready to use.
58
-
59
- ##### Returns
60
-
61
- `void`
@@ -1,50 +0,0 @@
1
- # Interface: AutofillHandlers
2
-
3
- ## Methods
4
-
5
- ### activate
6
-
7
- ▸ **activate**(`handlers`, `username?`): `void`
8
-
9
- Invokes a WebAuthn authentication, including prompting the user to select from a list of registered credentials using autofill, and then prompting the user for biometrics. In order to prompt this credentials list, the autocomplete="username webauthn" attribute **must** be defined on the username input box of the authentication page.<br/>
10
- If authentication is completed successfully, the `onSuccess` callback will be triggered with the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential) to retrieve user tokens.<br/>
11
- If it fails, the `onError` callback will be triggered with an SdkError.
12
-
13
- **`Throws`**
14
-
15
- [NotInitialized](../enums/ErrorCode.md#notinitialized)
16
-
17
- **`Throws`**
18
-
19
- [AuthenticationFailed](../enums/ErrorCode.md#authenticationfailed)
20
-
21
- **`Throws`**
22
-
23
- [AuthenticationCanceled](../enums/ErrorCode.md#authenticationcanceled)
24
-
25
- **`Throws`**
26
-
27
- [AutofillAuthenticationAborted](../enums/ErrorCode.md#autofillauthenticationaborted)
28
-
29
- #### Parameters
30
-
31
- | Name | Type | Description |
32
- | :------ | :------ | :------ |
33
- | `handlers` | [`AuthenticationAutofillActivateHandlers`](AuthenticationAutofillActivateHandlers.md) | Handlers that will be invoked once the authentication is completed (success or failure) |
34
- | `username?` | `string` | Name of user account, as used in the WebAuthn registration. If not provided, the authentication will start without the context of a user and it will be inferred by the chosen passkey |
35
-
36
- #### Returns
37
-
38
- `void`
39
-
40
- ___
41
-
42
- ### abort
43
-
44
- ▸ **abort**(): `void`
45
-
46
- Aborts a WebAuthn authentication. This method should be called after the passkey autofill is dismissed in order to be able to query existing passkeys once again. This will end the browser's `navigator.credentials.get()` operation.
47
-
48
- #### Returns
49
-
50
- `void`
@@ -1,27 +0,0 @@
1
- # Interface: CrossDeviceController
2
-
3
- WebAuthn cross device handlers interfaces
4
-
5
- ## Properties
6
-
7
- ### crossDeviceTicketId
8
-
9
- • **crossDeviceTicketId**: `string`
10
-
11
- Ticket ID for this cross-device flow.
12
-
13
- ___
14
-
15
- ### stop
16
-
17
- • **stop**: () => `void`
18
-
19
- #### Type declaration
20
-
21
- ▸ (): `void`
22
-
23
- Stops listening for events from devices in cross-device flows
24
-
25
- ##### Returns
26
-
27
- `void`
@@ -1,28 +0,0 @@
1
- # Interface: SdkError
2
-
3
- Common interface for `Promise` rejections.
4
- Developers should handle according to the `errorCode`
5
-
6
- ## Properties
7
-
8
- ### errorCode
9
-
10
- • `Readonly` **errorCode**: [`ErrorCode`](../enums/ErrorCode.md)
11
-
12
- Error code from [ErrorCode](../enums/ErrorCode.md)
13
-
14
- ___
15
-
16
- ### message
17
-
18
- • `Readonly` **message**: `string`
19
-
20
- Error message
21
-
22
- ___
23
-
24
- ### data
25
-
26
- • `Optional` `Readonly` **data**: `any`
27
-
28
- Additional data
@@ -1,73 +0,0 @@
1
- # Interface: WebauthnApis
2
-
3
- Alternate paths used by the SDK to route API calls to your proxy server.
4
-
5
- ## Properties
6
-
7
- ### startAuthentication
8
-
9
- • **startAuthentication**: `string`
10
-
11
- **`Default Value`**
12
-
13
- `/v1/auth/webauthn/authenticate/start`
14
-
15
- ___
16
-
17
- ### startRegistration
18
-
19
- • **startRegistration**: `string`
20
-
21
- **`Default Value`**
22
-
23
- `/v1/auth/webauthn/register/start`
24
-
25
- ___
26
-
27
- ### startCrossDeviceRegistration
28
-
29
- • **startCrossDeviceRegistration**: `string`
30
-
31
- **`Default Value`**
32
-
33
- `/v1/auth/webauthn/cross-device/register/start`
34
-
35
- ___
36
-
37
- ### initCrossDeviceAuthentication
38
-
39
- • **initCrossDeviceAuthentication**: `string`
40
-
41
- **`Default Value`**
42
-
43
- `/v1/auth/webauthn/cross-device/authenticate/init`
44
-
45
- ___
46
-
47
- ### startCrossDeviceAuthentication
48
-
49
- • **startCrossDeviceAuthentication**: `string`
50
-
51
- **`Default Value`**
52
-
53
- `/v1/auth/webauthn/cross-device/authenticate/start`
54
-
55
- ___
56
-
57
- ### getCrossDeviceTicketStatus
58
-
59
- • **getCrossDeviceTicketStatus**: `string`
60
-
61
- **`Default Value`**
62
-
63
- `/v1/auth/webauthn/cross-device/status`
64
-
65
- ___
66
-
67
- ### attachDeviceToCrossDeviceSession
68
-
69
- • **attachDeviceToCrossDeviceSession**: `string`
70
-
71
- **`Default Value`**
72
-
73
- `/v1/auth/webauthn/cross-device/attach-device`
@@ -1,52 +0,0 @@
1
- # Interface: WebauthnAuthenticationFlows
2
-
3
- ## Methods
4
-
5
- ### modal
6
-
7
- ▸ **modal**(`username?`, `options?`): `Promise`<`string`\>
8
-
9
- Invokes a WebAuthn authentication, including prompting the user to select from a list of registered credentials, and then prompting the user for biometrics. The credentials list is displayed using the native browser modal.<br/>
10
- If username isn't provided, it will promote a modal with a list of all discoverable credentials on the device. If username is provided, this call must be invoked for a registered username. If the target username is not registered or in case of any other failure, an SdkError will be thrown.<br/>
11
- If authentication is completed successfully, this call will return a promise that resolves to the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential) to retrieve user tokens.<br/>
12
-
13
- **`Throws`**
14
-
15
- [NotInitialized](../enums/ErrorCode.md#notinitialized)
16
-
17
- **`Throws`**
18
-
19
- [AuthenticationFailed](../enums/ErrorCode.md#authenticationfailed)
20
-
21
- **`Throws`**
22
-
23
- [AuthenticationCanceled](../enums/ErrorCode.md#authenticationcanceled)
24
-
25
- **`Throws`**
26
-
27
- [InvalidApprovalData](../enums/ErrorCode.md#invalidapprovaldata)
28
-
29
- **`Throws`**
30
-
31
- [AuthenticationProcessAlreadyActive](../enums/ErrorCode.md#authenticationprocessalreadyactive)
32
-
33
- #### Parameters
34
-
35
- | Name | Type | Description |
36
- | :------ | :------ | :------ |
37
- | `username?` | `string` | Name of user account, as used in the WebAuthn registration. If not provided, the authentication will start without the context of a user and it will be inferred by the chosen passkey |
38
- | `options?` | `WebauthnAuthenticationOptions` | WebauthnAuthenticationOptions Options for the authentication process |
39
-
40
- #### Returns
41
-
42
- `Promise`<`string`\>
43
-
44
- Base64-encoded object, which contains the credential result. This encoded result will be used to fetch user tokens via the [backend authentication endpoint](/openapi/user/backend-webauthn/#operation/authenticateWebauthnCredential).
45
-
46
- ## Properties
47
-
48
- ### autofill
49
-
50
- • **autofill**: [`AutofillHandlers`](AutofillHandlers.md)
51
-
52
- Property used to implement credential selection via autofill UI.
@@ -1,107 +0,0 @@
1
- # Interface: WebauthnCrossDeviceFlows
2
-
3
- ## Properties
4
-
5
- ### init
6
-
7
- • **init**: `Object`
8
-
9
- Initializes a cross device flow, such as when users request to login to a desktop using their mobile device. Once invoked, the SDK will start listening for events occurring on the other device,
10
- and calls your handlers when a state change is detected.
11
- These methods return a promise that resolves to a [CrossDeviceController](CrossDeviceController.md) object, which allows you to stop listening to events and includes the cross-device ticket ID which is used when attaching another device to the flow.
12
-
13
- #### Type declaration
14
-
15
- | Name | Type |
16
- | :------ | :------ |
17
- | `registration` | (`params`: { `crossDeviceTicketId`: `string` ; `handlers`: `CrossDeviceRegistrationHandlers` }) => `Promise`<[`CrossDeviceController`](CrossDeviceController.md)\> |
18
- | `authentication` | (`params`: { `username?`: `string` ; `handlers`: `CrossDeviceAuthenticationHandlers` }) => `Promise`<[`CrossDeviceController`](CrossDeviceController.md)\> |
19
- | `approval` | (`params`: { `username`: `string` ; `approvalData`: `Record`<`string`, `string`\> ; `handlers`: `CrossDeviceAuthenticationHandlers` }) => `Promise`<[`CrossDeviceController`](CrossDeviceController.md)\> |
20
-
21
- ___
22
-
23
- ### authenticate
24
-
25
- • **authenticate**: `Object`
26
-
27
- #### Type declaration
28
-
29
- | Name | Type |
30
- | :------ | :------ |
31
- | `modal` | (`crossDeviceTicketId`: `string`) => `Promise`<`string`\> |
32
-
33
- ___
34
-
35
- ### approve
36
-
37
- • **approve**: `Object`
38
-
39
- #### Type declaration
40
-
41
- | Name | Type |
42
- | :------ | :------ |
43
- | `modal` | (`crossDeviceTicketId`: `string`) => `Promise`<`string`\> |
44
-
45
- ___
46
-
47
- ### register
48
-
49
- • **register**: (`crossDeviceTicketId`: `string`, `options?`: [`WebauthnCrossDeviceRegistrationOptions`](WebauthnCrossDeviceRegistrationOptions.md)) => `Promise`<`string`\>
50
-
51
- #### Type declaration
52
-
53
- ▸ (`crossDeviceTicketId`, `options?`): `Promise`<`string`\>
54
-
55
- Invokes a WebAuthn credential registration for the user used in the cross device session init, including prompting the user for biometrics.
56
- If registration is completed successfully, this call will return a promise that resolves to the credential result, which is an object encoded as a base64 string. This encoded result should then be passed to the relevant backend registration endpoint to complete the registration for either a [logged-in user](/openapi/user/backend-webauthn/#operation/webauthn-registration) or [logged-out user](/openapi/user/backend-webauthn/#operation/webauthn-registration-external).
57
- If registration fails, an SdkError will be thrown.
58
- If the backend registration call was successful, CrossDeviceRegistrationHandlers.onCredentialRegister will be called.
59
-
60
- **`Throws`**
61
-
62
- [NotInitialized](../enums/ErrorCode.md#notinitialized)
63
-
64
- **`Throws`**
65
-
66
- [RegistrationFailed](../enums/ErrorCode.md#registrationfailed)
67
-
68
- **`Throws`**
69
-
70
- [RegistrationCanceled](../enums/ErrorCode.md#registrationcanceled)
71
-
72
- ##### Parameters
73
-
74
- | Name | Type | Description |
75
- | :------ | :------ | :------ |
76
- | `crossDeviceTicketId` | `string` | Ticket ID of the cross-device flow. retrieved from the [CrossDeviceController](CrossDeviceController.md) object. |
77
- | `options?` | [`WebauthnCrossDeviceRegistrationOptions`](WebauthnCrossDeviceRegistrationOptions.md) | Additional configuration for registration flow |
78
-
79
- ##### Returns
80
-
81
- `Promise`<`string`\>
82
-
83
- ___
84
-
85
- ### attachDevice
86
-
87
- • **attachDevice**: (`crossDeviceTicketId`: `string`) => `Promise`<`AttachDeviceResult`\>
88
-
89
- #### Type declaration
90
-
91
- ▸ (`crossDeviceTicketId`): `Promise`<`AttachDeviceResult`\>
92
-
93
- Indicates when a session is accepted on another device in cross-device flows.
94
-
95
- If successful,CrossDeviceRegistrationHandlers.onDeviceAttach will be called in registration flow and CrossDeviceAuthenticationHandlers.onDeviceAttach for authentication.
96
-
97
- ##### Parameters
98
-
99
- | Name | Type | Description |
100
- | :------ | :------ | :------ |
101
- | `crossDeviceTicketId` | `string` | Ticket ID of the cross-device flow. retrieved from the [CrossDeviceController](CrossDeviceController.md) object. |
102
-
103
- ##### Returns
104
-
105
- `Promise`<`AttachDeviceResult`\>
106
-
107
- AttachDeviceResult AttachDeviceResult. Object containing the ticket status, creation timestamp, and approval data (if passed in the init.authentication() call)
@@ -1,23 +0,0 @@
1
- # Interface: WebauthnCrossDeviceRegistrationOptions
2
-
3
- ## Hierarchy
4
-
5
- - **`WebauthnCrossDeviceRegistrationOptions`**
6
-
7
- ↳ [`WebauthnRegistrationOptions`](WebauthnRegistrationOptions.md)
8
-
9
- ## Properties
10
-
11
- ### allowCrossPlatformAuthenticators
12
-
13
- • `Optional` **allowCrossPlatformAuthenticators**: `boolean`
14
-
15
- Allow registration using cross-platform authenticators, such as a USB security key or a different device. If enabled, cross-device authentication flows can be performed using the native browser experience (via QR code). default: True
16
-
17
- ___
18
-
19
- ### registerAsDiscoverable
20
-
21
- • `Optional` **registerAsDiscoverable**: `boolean`
22
-
23
- Must be set to true to register credentials as passkeys when supported (except for Apple devices, which always register credentials as passkeys). default: True