@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.
- package/CHANGELOG.md +10 -2
- package/README.md +69 -41
- package/dist/drs.cjs +1 -1
- package/dist/drs.d.ts +1 -14
- package/dist/drs.js +1 -1
- package/dist/ido.cjs +2 -2
- package/dist/ido.d.ts +889 -6
- package/dist/ido.js +1 -1
- package/dist/idv.cjs +1 -1
- package/dist/idv.d.ts +1 -7
- package/dist/idv.js +1 -1
- package/dist/index.cjs +2 -2
- package/dist/index.esm.js +2 -2
- package/dist/index.umd.js +2 -2
- package/dist/ts-platform-websdk.js +2 -2
- package/dist/web-sdk-drs+idv+webauthn+ido.js +2 -2
- package/dist/web-sdk.d.ts +1 -1
- package/dist/webauthn.cjs +1 -1
- package/dist/webauthn.d.ts +1 -9
- package/dist/webauthn.js +1 -1
- package/package.json +13 -13
- package/build/drs-entry.d.ts +0 -20
- package/build/drs-entry.js +0 -19
- package/build/drs-only.d.ts +0 -22
- package/build/drs-only.js +0 -25
- package/build/drs.d.ts +0 -13
- package/build/drs.js +0 -45
- package/build/ido/idoImpl.d.ts +0 -2
- package/build/ido/idoImpl.js +0 -4
- package/build/ido/index.d.ts +0 -7
- package/build/ido/index.js +0 -9
- package/build/ido-entry.d.ts +0 -17
- package/build/ido-entry.js +0 -19
- package/build/ido.d.ts +0 -8
- package/build/ido.js +0 -27
- package/build/idv-entry.d.ts +0 -17
- package/build/idv-entry.js +0 -19
- package/build/idv.d.ts +0 -8
- package/build/idv.js +0 -27
- package/build/initialize-only.d.ts +0 -7
- package/build/initialize-only.js +0 -40
- package/build/initialize.d.ts +0 -1
- package/build/initialize.js +0 -2
- package/build/mainExport.d.ts +0 -16
- package/build/mainExport.js +0 -43
- package/build/sdk-factory.d.ts +0 -109
- package/build/sdk-factory.js +0 -108
- package/build/shared-state.d.ts +0 -4
- package/build/shared-state.js +0 -32
- package/build/webauthn-entry.d.ts +0 -19
- package/build/webauthn-entry.js +0 -19
- package/build/webauthn.d.ts +0 -12
- package/build/webauthn.js +0 -44
- package/bundler-config.json +0 -14
- package/dist/docs/.nojekyll +0 -1
- package/dist/docs/README.md +0 -72
- package/dist/docs/enums/ErrorCode.md +0 -113
- package/dist/docs/interfaces/ActionEventOptions.md +0 -44
- package/dist/docs/interfaces/ActionResponse.md +0 -9
- package/dist/docs/interfaces/AuthenticationAutofillActivateHandlers.md +0 -61
- package/dist/docs/interfaces/AutofillHandlers.md +0 -50
- package/dist/docs/interfaces/CrossDeviceController.md +0 -27
- package/dist/docs/interfaces/SdkError.md +0 -28
- package/dist/docs/interfaces/WebauthnApis.md +0 -73
- package/dist/docs/interfaces/WebauthnAuthenticationFlows.md +0 -52
- package/dist/docs/interfaces/WebauthnCrossDeviceFlows.md +0 -107
- package/dist/docs/interfaces/WebauthnCrossDeviceRegistrationOptions.md +0 -23
- package/dist/docs/interfaces/WebauthnRegistrationOptions.md +0 -55
- package/dist/docs/interfaces/initConfigParams.md +0 -7
- package/dist/docs/modules/drs.md +0 -92
- package/dist/docs/modules/idv.md +0 -106
- package/dist/docs/modules/webauthn.md +0 -197
- package/dist/docs/modules.md +0 -146
- package/scripts/make-semver-aliases.sh +0 -11
- package/scripts/upload-dist.sh +0 -9
- package/src/mainExport.ts +0 -75
- package/src/tsconfig.json +0 -14
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
# Interface: WebauthnRegistrationOptions
|
|
2
|
-
|
|
3
|
-
## Hierarchy
|
|
4
|
-
|
|
5
|
-
- [`WebauthnCrossDeviceRegistrationOptions`](WebauthnCrossDeviceRegistrationOptions.md)
|
|
6
|
-
|
|
7
|
-
↳ **`WebauthnRegistrationOptions`**
|
|
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
|
-
#### Inherited from
|
|
18
|
-
|
|
19
|
-
[WebauthnCrossDeviceRegistrationOptions](WebauthnCrossDeviceRegistrationOptions.md).[allowCrossPlatformAuthenticators](WebauthnCrossDeviceRegistrationOptions.md#allowcrossplatformauthenticators)
|
|
20
|
-
|
|
21
|
-
___
|
|
22
|
-
|
|
23
|
-
### registerAsDiscoverable
|
|
24
|
-
|
|
25
|
-
• `Optional` **registerAsDiscoverable**: `boolean`
|
|
26
|
-
|
|
27
|
-
Must be set to true to register credentials as passkeys when supported (except for Apple devices, which always register credentials as passkeys). default: True
|
|
28
|
-
|
|
29
|
-
#### Inherited from
|
|
30
|
-
|
|
31
|
-
[WebauthnCrossDeviceRegistrationOptions](WebauthnCrossDeviceRegistrationOptions.md).[registerAsDiscoverable](WebauthnCrossDeviceRegistrationOptions.md#registerasdiscoverable)
|
|
32
|
-
|
|
33
|
-
___
|
|
34
|
-
|
|
35
|
-
### displayName
|
|
36
|
-
|
|
37
|
-
• `Optional` **displayName**: `string`
|
|
38
|
-
|
|
39
|
-
Human-palatable name for the user account, only for display (max 64 characters). If not set, the username parameter will also act as the display name
|
|
40
|
-
|
|
41
|
-
___
|
|
42
|
-
|
|
43
|
-
### timeout
|
|
44
|
-
|
|
45
|
-
• `Optional` **timeout**: `number`
|
|
46
|
-
|
|
47
|
-
The timeout in seconds for the registration process. If the timeout is reached, the registration process will be aborted with error [RegistrationAbortedTimeout](../enums/ErrorCode.md#registrationabortedtimeout).
|
|
48
|
-
|
|
49
|
-
___
|
|
50
|
-
|
|
51
|
-
### limitSingleCredentialToDevice
|
|
52
|
-
|
|
53
|
-
• `Optional` **limitSingleCredentialToDevice**: `boolean`
|
|
54
|
-
|
|
55
|
-
Set to True in order to limit the creation of multiple credentials for the same account on a single authenticator. default: False
|
package/dist/docs/modules/drs.md
DELETED
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
# Namespace: drs
|
|
2
|
-
|
|
3
|
-
## Type Aliases
|
|
4
|
-
|
|
5
|
-
### ActionEventOptions
|
|
6
|
-
|
|
7
|
-
Ƭ **ActionEventOptions**: [`ActionEventOptions`](../interfaces/ActionEventOptions.md)
|
|
8
|
-
|
|
9
|
-
___
|
|
10
|
-
|
|
11
|
-
### ActionResponse
|
|
12
|
-
|
|
13
|
-
Ƭ **ActionResponse**: [`ActionResponse`](../interfaces/ActionResponse.md)
|
|
14
|
-
|
|
15
|
-
## Variables
|
|
16
|
-
|
|
17
|
-
### \_\_internal
|
|
18
|
-
|
|
19
|
-
• `Const` **\_\_internal**: typeof `__internal`
|
|
20
|
-
|
|
21
|
-
## Functions
|
|
22
|
-
|
|
23
|
-
### clearUser
|
|
24
|
-
|
|
25
|
-
▸ **clearUser**(`options?`): `Promise`<`boolean`\>
|
|
26
|
-
|
|
27
|
-
Clears the user context for all subsequent events in the browser session
|
|
28
|
-
|
|
29
|
-
#### Parameters
|
|
30
|
-
|
|
31
|
-
| Name | Type | Description |
|
|
32
|
-
| :------ | :------ | :------ |
|
|
33
|
-
| `options?` | `Object` | Reserved for future use |
|
|
34
|
-
|
|
35
|
-
#### Returns
|
|
36
|
-
|
|
37
|
-
`Promise`<`boolean`\>
|
|
38
|
-
|
|
39
|
-
Indicates if the call succeeded
|
|
40
|
-
|
|
41
|
-
___
|
|
42
|
-
|
|
43
|
-
### getSessionToken
|
|
44
|
-
|
|
45
|
-
▸ **getSessionToken**(): `Promise`<`any`\>
|
|
46
|
-
|
|
47
|
-
#### Returns
|
|
48
|
-
|
|
49
|
-
`Promise`<`any`\>
|
|
50
|
-
|
|
51
|
-
___
|
|
52
|
-
|
|
53
|
-
### setAuthenticatedUser
|
|
54
|
-
|
|
55
|
-
▸ **setAuthenticatedUser**(`userId`, `options?`): `Promise`<`boolean`\>
|
|
56
|
-
|
|
57
|
-
Sets the user context for all subsequent events in the browser session (or until the user is explicitly cleared)
|
|
58
|
-
It should be set only after you've fully authenticated the user (including, for example, any 2FA that was required)
|
|
59
|
-
|
|
60
|
-
#### Parameters
|
|
61
|
-
|
|
62
|
-
| Name | Type | Description |
|
|
63
|
-
| :------ | :------ | :------ |
|
|
64
|
-
| `userId` | `string` | Opaque identifier of the user in your system |
|
|
65
|
-
| `options?` | `Object` | Reserved for future use |
|
|
66
|
-
|
|
67
|
-
#### Returns
|
|
68
|
-
|
|
69
|
-
`Promise`<`boolean`\>
|
|
70
|
-
|
|
71
|
-
Indicates if the call succeeded
|
|
72
|
-
|
|
73
|
-
___
|
|
74
|
-
|
|
75
|
-
### triggerActionEvent
|
|
76
|
-
|
|
77
|
-
▸ **triggerActionEvent**(`actionType`, `options?`): `Promise`<[`ActionResponse`](../interfaces/ActionResponse.md)\>
|
|
78
|
-
|
|
79
|
-
Reports a user action event to the SDK
|
|
80
|
-
|
|
81
|
-
#### Parameters
|
|
82
|
-
|
|
83
|
-
| Name | Type | Description |
|
|
84
|
-
| :------ | :------ | :------ |
|
|
85
|
-
| `actionType` | `string` | Type of user action event that was predefined in the Transmit Security server |
|
|
86
|
-
| `options?` | [`ActionEventOptions`](../interfaces/ActionEventOptions.md) | - |
|
|
87
|
-
|
|
88
|
-
#### Returns
|
|
89
|
-
|
|
90
|
-
`Promise`<[`ActionResponse`](../interfaces/ActionResponse.md)\>
|
|
91
|
-
|
|
92
|
-
Indicates if the call succeeded
|
package/dist/docs/modules/idv.md
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
# Namespace: idv
|
|
2
|
-
|
|
3
|
-
## Functions
|
|
4
|
-
|
|
5
|
-
### recapture
|
|
6
|
-
|
|
7
|
-
▸ **recapture**(): `Promise`<`boolean`\>
|
|
8
|
-
|
|
9
|
-
Recaptures the required images in case the `recapture` status is returned. For example, this may occur in case some data
|
|
10
|
-
couldn't be extracted due to poor image quality.
|
|
11
|
-
|
|
12
|
-
**`Function`**
|
|
13
|
-
|
|
14
|
-
recapture
|
|
15
|
-
|
|
16
|
-
**`Memberof`**
|
|
17
|
-
|
|
18
|
-
module:core
|
|
19
|
-
|
|
20
|
-
**`Example`**
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
const showLoader = true;
|
|
24
|
-
tsPlatform.idv.recapture().then((success) => {
|
|
25
|
-
showLoader = false;
|
|
26
|
-
if (success) {
|
|
27
|
-
console.log('Recapture started');
|
|
28
|
-
} else {
|
|
29
|
-
console.log('Recapture not started');
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
#### Returns
|
|
35
|
-
|
|
36
|
-
`Promise`<`boolean`\>
|
|
37
|
-
|
|
38
|
-
Indicates if the session was started successfully
|
|
39
|
-
|
|
40
|
-
___
|
|
41
|
-
|
|
42
|
-
### restart
|
|
43
|
-
|
|
44
|
-
▸ **restart**(): `Promise`<`boolean`\>
|
|
45
|
-
|
|
46
|
-
deprecated use module:tsPlatform.idv.recapture|recapture instead
|
|
47
|
-
TODO: [VER-3126](https://transmitsecurity.atlassian.net/browse/VER-3126)
|
|
48
|
-
|
|
49
|
-
#### Returns
|
|
50
|
-
|
|
51
|
-
`Promise`<`boolean`\>
|
|
52
|
-
|
|
53
|
-
___
|
|
54
|
-
|
|
55
|
-
### start
|
|
56
|
-
|
|
57
|
-
▸ **start**(`startToken?`): `Promise`<`boolean`\>
|
|
58
|
-
|
|
59
|
-
Starts a verification session that was created in the backend (via the [Verification API](/openapi/verify/verifications/#operation/createSession)).
|
|
60
|
-
This will start the verification process for the user and guides them through the entire identity verification flow
|
|
61
|
-
using the Transmit identity verification experience, which includes capturing the required images and submitting them for processing.
|
|
62
|
-
|
|
63
|
-
**`Function`**
|
|
64
|
-
|
|
65
|
-
start
|
|
66
|
-
|
|
67
|
-
**`Memberof`**
|
|
68
|
-
|
|
69
|
-
module:core
|
|
70
|
-
|
|
71
|
-
**`Example`**
|
|
72
|
-
|
|
73
|
-
```ts
|
|
74
|
-
const showLoader = true;
|
|
75
|
-
const startToken = '123456'; // start_token returned by the backend upon session creation
|
|
76
|
-
tsPlatform.idv.start(startToken).then((started) => {
|
|
77
|
-
showLoader = false;
|
|
78
|
-
if (started) {
|
|
79
|
-
console.log('Session started');
|
|
80
|
-
} else {
|
|
81
|
-
console.log('Session not started');
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
|
-
```
|
|
85
|
-
|
|
86
|
-
#### Parameters
|
|
87
|
-
|
|
88
|
-
| Name | Type | Description |
|
|
89
|
-
| :------ | :------ | :------ |
|
|
90
|
-
| `startToken?` | `string` | The start_token returned by the backend when the session was created, used to bind the session to the device |
|
|
91
|
-
|
|
92
|
-
#### Returns
|
|
93
|
-
|
|
94
|
-
`Promise`<`boolean`\>
|
|
95
|
-
|
|
96
|
-
Indicates if the session was started successfully
|
|
97
|
-
|
|
98
|
-
___
|
|
99
|
-
|
|
100
|
-
### version
|
|
101
|
-
|
|
102
|
-
▸ **version**(): `string`
|
|
103
|
-
|
|
104
|
-
#### Returns
|
|
105
|
-
|
|
106
|
-
`string`
|
|
@@ -1,197 +0,0 @@
|
|
|
1
|
-
# Namespace: webauthn
|
|
2
|
-
|
|
3
|
-
## Type Aliases
|
|
4
|
-
|
|
5
|
-
### ApiCrossDeviceStatusResponse
|
|
6
|
-
|
|
7
|
-
Ƭ **ApiCrossDeviceStatusResponse**: `ApiCrossDeviceStatusResponse`
|
|
8
|
-
|
|
9
|
-
___
|
|
10
|
-
|
|
11
|
-
### AttachDeviceResult
|
|
12
|
-
|
|
13
|
-
Ƭ **AttachDeviceResult**: `AttachDeviceResult`
|
|
14
|
-
|
|
15
|
-
___
|
|
16
|
-
|
|
17
|
-
### AuthenticationAutofillActivateHandlers
|
|
18
|
-
|
|
19
|
-
Ƭ **AuthenticationAutofillActivateHandlers**: [`AuthenticationAutofillActivateHandlers`](../interfaces/AuthenticationAutofillActivateHandlers.md)
|
|
20
|
-
|
|
21
|
-
___
|
|
22
|
-
|
|
23
|
-
### AutofillHandlers
|
|
24
|
-
|
|
25
|
-
Ƭ **AutofillHandlers**: [`AutofillHandlers`](../interfaces/AutofillHandlers.md)
|
|
26
|
-
|
|
27
|
-
___
|
|
28
|
-
|
|
29
|
-
### CrossDeviceAuthenticationHandlers
|
|
30
|
-
|
|
31
|
-
Ƭ **CrossDeviceAuthenticationHandlers**: `CrossDeviceAuthenticationHandlers`
|
|
32
|
-
|
|
33
|
-
___
|
|
34
|
-
|
|
35
|
-
### CrossDeviceController
|
|
36
|
-
|
|
37
|
-
Ƭ **CrossDeviceController**: [`CrossDeviceController`](../interfaces/CrossDeviceController.md)
|
|
38
|
-
|
|
39
|
-
___
|
|
40
|
-
|
|
41
|
-
### CrossDeviceRegistrationHandlers
|
|
42
|
-
|
|
43
|
-
Ƭ **CrossDeviceRegistrationHandlers**: `CrossDeviceRegistrationHandlers`
|
|
44
|
-
|
|
45
|
-
___
|
|
46
|
-
|
|
47
|
-
### SdkError
|
|
48
|
-
|
|
49
|
-
Ƭ **SdkError**: [`SdkError`](../interfaces/SdkError.md)
|
|
50
|
-
|
|
51
|
-
___
|
|
52
|
-
|
|
53
|
-
### WebauthnApis
|
|
54
|
-
|
|
55
|
-
Ƭ **WebauthnApis**: [`WebauthnApis`](../interfaces/WebauthnApis.md)
|
|
56
|
-
|
|
57
|
-
___
|
|
58
|
-
|
|
59
|
-
### WebauthnApprovalFlows
|
|
60
|
-
|
|
61
|
-
Ƭ **WebauthnApprovalFlows**: `WebauthnApprovalFlows`
|
|
62
|
-
|
|
63
|
-
___
|
|
64
|
-
|
|
65
|
-
### WebauthnAuthenticationFlows
|
|
66
|
-
|
|
67
|
-
Ƭ **WebauthnAuthenticationFlows**: [`WebauthnAuthenticationFlows`](../interfaces/WebauthnAuthenticationFlows.md)
|
|
68
|
-
|
|
69
|
-
___
|
|
70
|
-
|
|
71
|
-
### WebauthnAuthenticationOptions
|
|
72
|
-
|
|
73
|
-
Ƭ **WebauthnAuthenticationOptions**: `WebauthnAuthenticationOptions`
|
|
74
|
-
|
|
75
|
-
___
|
|
76
|
-
|
|
77
|
-
### WebauthnCrossDeviceFlows
|
|
78
|
-
|
|
79
|
-
Ƭ **WebauthnCrossDeviceFlows**: [`WebauthnCrossDeviceFlows`](../interfaces/WebauthnCrossDeviceFlows.md)
|
|
80
|
-
|
|
81
|
-
___
|
|
82
|
-
|
|
83
|
-
### WebauthnCrossDeviceRegistrationOptions
|
|
84
|
-
|
|
85
|
-
Ƭ **WebauthnCrossDeviceRegistrationOptions**: [`WebauthnCrossDeviceRegistrationOptions`](../interfaces/WebauthnCrossDeviceRegistrationOptions.md)
|
|
86
|
-
|
|
87
|
-
___
|
|
88
|
-
|
|
89
|
-
### WebauthnCrossDeviceStatus
|
|
90
|
-
|
|
91
|
-
Ƭ **WebauthnCrossDeviceStatus**: `WebauthnCrossDeviceStatus`
|
|
92
|
-
|
|
93
|
-
___
|
|
94
|
-
|
|
95
|
-
### WebauthnRegistrationOptions
|
|
96
|
-
|
|
97
|
-
Ƭ **WebauthnRegistrationOptions**: [`WebauthnRegistrationOptions`](../interfaces/WebauthnRegistrationOptions.md)
|
|
98
|
-
|
|
99
|
-
## Variables
|
|
100
|
-
|
|
101
|
-
### WebauthnCrossDeviceStatus
|
|
102
|
-
|
|
103
|
-
• **WebauthnCrossDeviceStatus**: typeof `WebauthnCrossDeviceStatus`
|
|
104
|
-
|
|
105
|
-
___
|
|
106
|
-
|
|
107
|
-
### approve
|
|
108
|
-
|
|
109
|
-
• `Const` **approve**: typeof `approve`
|
|
110
|
-
|
|
111
|
-
___
|
|
112
|
-
|
|
113
|
-
### authenticate
|
|
114
|
-
|
|
115
|
-
• `Const` **authenticate**: typeof [`authenticate`](../modules.md#authenticate)
|
|
116
|
-
|
|
117
|
-
___
|
|
118
|
-
|
|
119
|
-
### crossDevice
|
|
120
|
-
|
|
121
|
-
• `Const` **crossDevice**: typeof [`crossDevice`](../modules.md#crossdevice)
|
|
122
|
-
|
|
123
|
-
## Functions
|
|
124
|
-
|
|
125
|
-
### getDefaultPaths
|
|
126
|
-
|
|
127
|
-
▸ **getDefaultPaths**(): [`WebauthnApis`](../interfaces/WebauthnApis.md)
|
|
128
|
-
|
|
129
|
-
Returns the default API paths for webauthn
|
|
130
|
-
|
|
131
|
-
#### Returns
|
|
132
|
-
|
|
133
|
-
[`WebauthnApis`](../interfaces/WebauthnApis.md)
|
|
134
|
-
|
|
135
|
-
___
|
|
136
|
-
|
|
137
|
-
### isAutofillSupported
|
|
138
|
-
|
|
139
|
-
▸ **isAutofillSupported**(): `Promise`<`boolean`\>
|
|
140
|
-
|
|
141
|
-
Indicates whether this browser supports Passkey Autofill
|
|
142
|
-
|
|
143
|
-
#### Returns
|
|
144
|
-
|
|
145
|
-
`Promise`<`boolean`\>
|
|
146
|
-
|
|
147
|
-
___
|
|
148
|
-
|
|
149
|
-
### isPlatformAuthenticatorSupported
|
|
150
|
-
|
|
151
|
-
▸ **isPlatformAuthenticatorSupported**(): `Promise`<`boolean`\>
|
|
152
|
-
|
|
153
|
-
Indicates whether this browser supports WebAuthn, and has a platform authenticator
|
|
154
|
-
|
|
155
|
-
#### Returns
|
|
156
|
-
|
|
157
|
-
`Promise`<`boolean`\>
|
|
158
|
-
|
|
159
|
-
___
|
|
160
|
-
|
|
161
|
-
### register
|
|
162
|
-
|
|
163
|
-
▸ **register**(`username`, `options?`): `Promise`<`string`\>
|
|
164
|
-
|
|
165
|
-
Invokes a WebAuthn credential registration for the specified user, including prompting the user for biometrics.
|
|
166
|
-
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).
|
|
167
|
-
|
|
168
|
-
If registration fails, an SdkError will be thrown.
|
|
169
|
-
|
|
170
|
-
**`Throws`**
|
|
171
|
-
|
|
172
|
-
[NotInitialized](../enums/ErrorCode.md#notinitialized)
|
|
173
|
-
|
|
174
|
-
**`Throws`**
|
|
175
|
-
|
|
176
|
-
[RegistrationFailed](../enums/ErrorCode.md#registrationfailed)
|
|
177
|
-
|
|
178
|
-
**`Throws`**
|
|
179
|
-
|
|
180
|
-
[RegistrationCanceled](../enums/ErrorCode.md#registrationcanceled)
|
|
181
|
-
|
|
182
|
-
#### Parameters
|
|
183
|
-
|
|
184
|
-
| Name | Type | Description |
|
|
185
|
-
| :------ | :------ | :------ |
|
|
186
|
-
| `username` | `string` | WebAuthn username to register |
|
|
187
|
-
| `options?` | [`WebauthnRegistrationOptions`](../interfaces/WebauthnRegistrationOptions.md) | Additional configuration for registration flow |
|
|
188
|
-
|
|
189
|
-
#### Returns
|
|
190
|
-
|
|
191
|
-
`Promise`<`string`\>
|
|
192
|
-
|
|
193
|
-
## References
|
|
194
|
-
|
|
195
|
-
### ErrorCode
|
|
196
|
-
|
|
197
|
-
Re-exports [ErrorCode](../enums/ErrorCode.md)
|
package/dist/docs/modules.md
DELETED
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
# Transmit Security Web SDK API Reference
|
|
2
|
-
|
|
3
|
-
## Interfaces
|
|
4
|
-
|
|
5
|
-
- [ActionResponse](interfaces/ActionResponse.md)
|
|
6
|
-
- [ActionEventOptions](interfaces/ActionEventOptions.md)
|
|
7
|
-
- [WebauthnApis](interfaces/WebauthnApis.md)
|
|
8
|
-
- [CrossDeviceController](interfaces/CrossDeviceController.md)
|
|
9
|
-
- [WebauthnCrossDeviceRegistrationOptions](interfaces/WebauthnCrossDeviceRegistrationOptions.md)
|
|
10
|
-
- [WebauthnRegistrationOptions](interfaces/WebauthnRegistrationOptions.md)
|
|
11
|
-
- [WebauthnCrossDeviceFlows](interfaces/WebauthnCrossDeviceFlows.md)
|
|
12
|
-
- [SdkError](interfaces/SdkError.md)
|
|
13
|
-
- [AuthenticationAutofillActivateHandlers](interfaces/AuthenticationAutofillActivateHandlers.md)
|
|
14
|
-
- [AutofillHandlers](interfaces/AutofillHandlers.md)
|
|
15
|
-
- [WebauthnAuthenticationFlows](interfaces/WebauthnAuthenticationFlows.md)
|
|
16
|
-
- [initConfigParams](interfaces/initConfigParams.md)
|
|
17
|
-
|
|
18
|
-
## Namespaces
|
|
19
|
-
|
|
20
|
-
- [drs](modules/drs.md)
|
|
21
|
-
- [idv](modules/idv.md)
|
|
22
|
-
- [webauthn](modules/webauthn.md)
|
|
23
|
-
|
|
24
|
-
## Enumerations
|
|
25
|
-
|
|
26
|
-
- [ErrorCode](enums/ErrorCode.md)
|
|
27
|
-
|
|
28
|
-
## Variables
|
|
29
|
-
|
|
30
|
-
### authenticate
|
|
31
|
-
|
|
32
|
-
• `Const` **authenticate**: [`WebauthnAuthenticationFlows`](interfaces/WebauthnAuthenticationFlows.md)
|
|
33
|
-
|
|
34
|
-
Returns the authentication flows for webauthn
|
|
35
|
-
|
|
36
|
-
___
|
|
37
|
-
|
|
38
|
-
### crossDevice
|
|
39
|
-
|
|
40
|
-
• `Const` **crossDevice**: [`WebauthnCrossDeviceFlows`](interfaces/WebauthnCrossDeviceFlows.md)
|
|
41
|
-
|
|
42
|
-
Returns webauthn cross device flows
|
|
43
|
-
|
|
44
|
-
___
|
|
45
|
-
|
|
46
|
-
### ido
|
|
47
|
-
|
|
48
|
-
• `Const` **ido**: `IdoSdk`
|
|
49
|
-
|
|
50
|
-
___
|
|
51
|
-
|
|
52
|
-
### default
|
|
53
|
-
|
|
54
|
-
• `Const` **default**: `TSWebSDK`
|
|
55
|
-
|
|
56
|
-
___
|
|
57
|
-
|
|
58
|
-
### PACKAGE\_VERSION
|
|
59
|
-
|
|
60
|
-
• `Const` **PACKAGE\_VERSION**: ``"1.16.0"``
|
|
61
|
-
|
|
62
|
-
## Functions
|
|
63
|
-
|
|
64
|
-
### register
|
|
65
|
-
|
|
66
|
-
▸ **register**(`username`, `options?`): `Promise`<`string`\>
|
|
67
|
-
|
|
68
|
-
Invokes a WebAuthn credential registration for the specified user, including prompting the user for biometrics.
|
|
69
|
-
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).
|
|
70
|
-
|
|
71
|
-
If registration fails, an SdkError will be thrown.
|
|
72
|
-
|
|
73
|
-
**`Throws`**
|
|
74
|
-
|
|
75
|
-
[NotInitialized](enums/ErrorCode.md#notinitialized)
|
|
76
|
-
|
|
77
|
-
**`Throws`**
|
|
78
|
-
|
|
79
|
-
[RegistrationFailed](enums/ErrorCode.md#registrationfailed)
|
|
80
|
-
|
|
81
|
-
**`Throws`**
|
|
82
|
-
|
|
83
|
-
[RegistrationCanceled](enums/ErrorCode.md#registrationcanceled)
|
|
84
|
-
|
|
85
|
-
#### Parameters
|
|
86
|
-
|
|
87
|
-
| Name | Type | Description |
|
|
88
|
-
| :------ | :------ | :------ |
|
|
89
|
-
| `username` | `string` | WebAuthn username to register |
|
|
90
|
-
| `options?` | [`WebauthnRegistrationOptions`](interfaces/WebauthnRegistrationOptions.md) | Additional configuration for registration flow |
|
|
91
|
-
|
|
92
|
-
#### Returns
|
|
93
|
-
|
|
94
|
-
`Promise`<`string`\>
|
|
95
|
-
|
|
96
|
-
___
|
|
97
|
-
|
|
98
|
-
### isPlatformAuthenticatorSupported
|
|
99
|
-
|
|
100
|
-
▸ **isPlatformAuthenticatorSupported**(): `Promise`<`boolean`\>
|
|
101
|
-
|
|
102
|
-
Indicates whether this browser supports WebAuthn, and has a platform authenticator
|
|
103
|
-
|
|
104
|
-
#### Returns
|
|
105
|
-
|
|
106
|
-
`Promise`<`boolean`\>
|
|
107
|
-
|
|
108
|
-
___
|
|
109
|
-
|
|
110
|
-
### isAutofillSupported
|
|
111
|
-
|
|
112
|
-
▸ **isAutofillSupported**(): `Promise`<`boolean`\>
|
|
113
|
-
|
|
114
|
-
Indicates whether this browser supports Passkey Autofill
|
|
115
|
-
|
|
116
|
-
#### Returns
|
|
117
|
-
|
|
118
|
-
`Promise`<`boolean`\>
|
|
119
|
-
|
|
120
|
-
___
|
|
121
|
-
|
|
122
|
-
### getDefaultPaths
|
|
123
|
-
|
|
124
|
-
▸ **getDefaultPaths**(): [`WebauthnApis`](interfaces/WebauthnApis.md)
|
|
125
|
-
|
|
126
|
-
Returns the default API paths for webauthn
|
|
127
|
-
|
|
128
|
-
#### Returns
|
|
129
|
-
|
|
130
|
-
[`WebauthnApis`](interfaces/WebauthnApis.md)
|
|
131
|
-
|
|
132
|
-
___
|
|
133
|
-
|
|
134
|
-
### initialize
|
|
135
|
-
|
|
136
|
-
▸ **initialize**(`params`): `void`
|
|
137
|
-
|
|
138
|
-
#### Parameters
|
|
139
|
-
|
|
140
|
-
| Name | Type |
|
|
141
|
-
| :------ | :------ |
|
|
142
|
-
| `params` | [`initConfigParams`](interfaces/initConfigParams.md) |
|
|
143
|
-
|
|
144
|
-
#### Returns
|
|
145
|
-
|
|
146
|
-
`void`
|
package/scripts/upload-dist.sh
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env bash
|
|
2
|
-
|
|
3
|
-
# Set default CDN bucket if not provided
|
|
4
|
-
platform_sdk_cdn=${platform_sdk_cdn:-"platform-websdk.idsec-dev.com"}
|
|
5
|
-
|
|
6
|
-
cdn_dir=gs://$platform_sdk_cdn/platform-websdk/$npm_package_version
|
|
7
|
-
|
|
8
|
-
gsutil cp dist/web-sdk-*.js $cdn_dir/ts-platform-websdk.js
|
|
9
|
-
gsutil cp dist/web-sdk.d.ts $cdn_dir/ts-platform-websdk.d.ts
|
package/src/mainExport.ts
DELETED
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// Browser Environment Validation
|
|
2
|
-
(function validateBrowserEnvironment() {
|
|
3
|
-
const isBrowser = typeof window !== 'undefined' && typeof document !== 'undefined';
|
|
4
|
-
const isNode = typeof globalThis !== 'undefined' &&
|
|
5
|
-
typeof (globalThis as any).process !== 'undefined' &&
|
|
6
|
-
(globalThis as any).process?.versions?.node;
|
|
7
|
-
|
|
8
|
-
if (isNode && !isBrowser) {
|
|
9
|
-
throw new Error(
|
|
10
|
-
'\n🚫 @TransmitSecurity/web-sdk is a BROWSER-ONLY package.\n\n' +
|
|
11
|
-
'❌ Node.js environments are not supported.\n' +
|
|
12
|
-
'✅ Use this package in web browsers only.\n\n' +
|
|
13
|
-
'For more information, visit: https://github.com/transmitsecurity-dev/ciam-web-sdk#browser-only\n'
|
|
14
|
-
);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
if (!isBrowser) {
|
|
18
|
-
console.warn(
|
|
19
|
-
'⚠️ @TransmitSecurity/web-sdk: Browser environment not detected. ' +
|
|
20
|
-
'Some features may not work correctly.'
|
|
21
|
-
);
|
|
22
|
-
}
|
|
23
|
-
})();
|
|
24
|
-
|
|
25
|
-
// Export common SDK functionality (initialize, etc.)
|
|
26
|
-
export * from '@transmit-security/web-sdk-common/dist/main-entry';
|
|
27
|
-
|
|
28
|
-
// Import individual modules
|
|
29
|
-
import * as drsMod from '@transmit-security/riskid_sdk';
|
|
30
|
-
import * as idvMod from '@transmit-security/ts-identity-verification';
|
|
31
|
-
|
|
32
|
-
// Export TypeScript types for better developer experience
|
|
33
|
-
export type { ActionEventOptions, ActionResponse } from "@transmit-security/riskid_sdk";
|
|
34
|
-
export type {
|
|
35
|
-
authenticate,
|
|
36
|
-
WebauthnApis,
|
|
37
|
-
WebauthnAuthenticationFlows,
|
|
38
|
-
AutofillHandlers,
|
|
39
|
-
AuthenticationAutofillActivateHandlers,
|
|
40
|
-
WebauthnRegistrationOptions,
|
|
41
|
-
isAutofillSupported,
|
|
42
|
-
SdkError,
|
|
43
|
-
ErrorCode,
|
|
44
|
-
isPlatformAuthenticatorSupported,
|
|
45
|
-
register,
|
|
46
|
-
crossDevice,
|
|
47
|
-
CrossDeviceController,
|
|
48
|
-
WebauthnCrossDeviceRegistrationOptions,
|
|
49
|
-
WebauthnCrossDeviceFlows,
|
|
50
|
-
getDefaultPaths
|
|
51
|
-
} from '@transmit-security/authentication-sdk';
|
|
52
|
-
|
|
53
|
-
// Module factories for dynamic loading
|
|
54
|
-
const factories = {
|
|
55
|
-
drs: drsMod as unknown as () => Record<string, any>,
|
|
56
|
-
idv: idvMod as unknown as () => Record<string, any>,
|
|
57
|
-
};
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Main SDK class for CDN usage (window.tsPlatform)
|
|
61
|
-
* Provides access to all modules and common functionality
|
|
62
|
-
*/
|
|
63
|
-
class TSWebSDK {
|
|
64
|
-
factories = factories;
|
|
65
|
-
|
|
66
|
-
constructor() {
|
|
67
|
-
// Attach DRS module functions
|
|
68
|
-
Object.assign(this, drsMod);
|
|
69
|
-
// Attach IDV module functions
|
|
70
|
-
Object.assign(this, idvMod);
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
// Export default instance for CDN usage
|
|
75
|
-
export default new TSWebSDK();
|