cidaas-javascript-sdk 5.1.0 → 5.1.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/CHANGELOG.md CHANGED
@@ -1,18 +1,28 @@
1
- # [5.1.0](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v5.0.0...v5.1.0) (2025-11-14)
1
+ ## [5.1.3](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/compare/v5.1.2...v5.1.3) (2026-02-26)
2
2
 
3
3
 
4
4
  ### Bug Fixes
5
5
 
6
- * update doc ([9e8f48f](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/9e8f48fbe0a296435e7330a6c0cc22a12d506e06))
6
+ * backward-compatible SDK fixes for parsing, promises, and types ([1559fae](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/1559fae00611cba245850439fb2723bf59c44242))
7
+ * update changelog ([630af23](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/630af23a235aa0820a259f42eecdc3ac7615bdec))
7
8
 
9
+ # Changelog
10
+
11
+ ## V5.1.3
8
12
 
9
- ### Features
13
+ ### Fixed
14
+ - backward-compatible SDK fixes for parsing, promises, and types
10
15
 
11
- * **login-service:** improve social login with flexible query parameters ([9492a9e](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/9492a9e52faa6f230662c949039119d84e88df8f))
12
- * **login-service:** improve social login with flexible query parameters ([21bb073](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/21bb07346878cf2550eeaf258523f1f568270d9c))
13
- * **login-service:** improve social login with flexible query parameters ([ed7bc6a](https://gitlab.widas.de/cidaas-public-devkits/cidaas-public-sdks/cidaas-javascript-sdk/commit/ed7bc6a46a06ab6bef5d4553e0e78802f2c950e0))
16
+ ## V5.1.2
14
17
 
15
- # Changelog
18
+ ### Fixed
19
+ - api adjustments for initiateAccountVerification(), verifyAccount(), getAllVerificationList(), initiateMFA(), authenticateMFA()
20
+
21
+ ## V5.1.0
22
+
23
+ ### Changed
24
+ - improve social login with flexible query parameters
25
+ - update doc
16
26
 
17
27
  ## V5.0.0
18
28
 
@@ -36,10 +36,18 @@ class Helper {
36
36
  return new Promise((resolve, reject) => {
37
37
  try {
38
38
  const http = new XMLHttpRequest();
39
+ http.onerror = function () {
40
+ reject(new Error("Network request failed"));
41
+ };
39
42
  http.onreadystatechange = function () {
40
43
  if (http.readyState == 4) {
41
44
  if (http.responseText) {
42
- resolve(JSON.parse(http.responseText));
45
+ try {
46
+ resolve(JSON.parse(http.responseText));
47
+ }
48
+ catch (parseError) {
49
+ reject(parseError instanceof Error ? parseError : new Error(String(parseError)));
50
+ }
43
51
  }
44
52
  else {
45
53
  resolve(errorResolver);
@@ -93,7 +101,7 @@ class Helper {
93
101
  try {
94
102
  userManager.getUser().then((user) => {
95
103
  resolve(user === null || user === void 0 ? void 0 : user.access_token);
96
- });
104
+ }).catch(reject);
97
105
  }
98
106
  catch (ex) {
99
107
  reject(ex);
@@ -74,6 +74,7 @@ class DeviceService {
74
74
  const serviceURL = this.config.authority + '/device-srv/deviceinfo';
75
75
  return Helper_1.Helper.createHttpPromise(options, serviceURL, false, 'POST');
76
76
  }
77
+ return Promise.resolve();
77
78
  }
78
79
  }
79
80
  exports.DeviceService = DeviceService;
@@ -67,6 +67,10 @@ export interface PasswordlessLoginRequest {
67
67
  * Either sub or q have to be provided, depends on what is given from the query parameter.
68
68
  */
69
69
  q?: string;
70
+ /**
71
+ * Link id used to complete Account Linking after successful authentication
72
+ */
73
+ 'link-id'?: string;
70
74
  }
71
75
  export interface FirstTimeChangePasswordRequest {
72
76
  /** Old password to be changed */
@@ -26,7 +26,7 @@ class VerificationService {
26
26
  */
27
27
  initiateAccountVerification(options) {
28
28
  try {
29
- const url = this.config.authority + "/verification-srv/account/initiate";
29
+ const url = `${this.config.authority}/verification-actions-srv/account/initiation`;
30
30
  const form = Helper_1.Helper.createForm(url, options);
31
31
  document.body.appendChild(form);
32
32
  form.submit();
@@ -51,7 +51,7 @@ class VerificationService {
51
51
  * ```
52
52
  */
53
53
  verifyAccount(options, headers) {
54
- const _serviceURL = this.config.authority + "/verification-srv/account/verify";
54
+ const _serviceURL = `${this.config.authority}/verification-actions-srv/account`;
55
55
  return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
56
56
  }
57
57
  /**
@@ -112,7 +112,7 @@ class VerificationService {
112
112
  * ```
113
113
  */
114
114
  getAllVerificationList(access_token, headers) {
115
- const _serviceURL = `${this.config.authority}/verification-srv/config/list`;
115
+ const _serviceURL = `${this.config.authority}/verification-actions-srv/config`;
116
116
  if (access_token) {
117
117
  return Helper_1.Helper.createHttpPromise(undefined, _serviceURL, undefined, "GET", access_token, headers);
118
118
  }
@@ -244,7 +244,7 @@ class VerificationService {
244
244
  * ```
245
245
  */
246
246
  initiateMFA(options, headers) {
247
- const _serviceURL = this.config.authority + "/verification-srv/v2/authenticate/initiate/" + options.type;
247
+ const _serviceURL = `${this.config.authority}/verification-srv/authentication/${options.type}/initiation`;
248
248
  return Helper_1.Helper.createHttpPromise(options, _serviceURL, false, "POST", undefined, headers);
249
249
  }
250
250
  /**
@@ -266,7 +266,7 @@ class VerificationService {
266
266
  * ```
267
267
  */
268
268
  authenticateMFA(options, headers) {
269
- const _serviceURL = this.config.authority + "/verification-srv/v2/authenticate/authenticate/" + options.type;
269
+ const _serviceURL = `${this.config.authority}/verification-srv/authentication/${options.type}/verification`;
270
270
  return Helper_1.Helper.createHttpPromise(options, _serviceURL, undefined, "POST", undefined, headers);
271
271
  }
272
272
  /**
@@ -84,7 +84,7 @@ export interface EnrollVerificationRequest {
84
84
  device_id?: string;
85
85
  /** unique identifier of client app, can be found in app setting under admin ui */
86
86
  client_id?: string;
87
- /** code to authenticae */
87
+ /** code to authenticate */
88
88
  pass_code?: string;
89
89
  }
90
90
  export interface CheckVerificationTypeConfiguredRequest extends GetMFAListRequest {
@@ -121,7 +121,7 @@ export interface AuthenticateMFARequest {
121
121
  /** Subject (User) identifier */
122
122
  sub?: string;
123
123
  /** id generated on Authz request */
124
- requestId?: PerformanceServerTiming;
124
+ requestId?: string;
125
125
  }
126
126
  export interface DeviceInfo {
127
127
  /** id of the device */
@@ -162,7 +162,7 @@ export interface ConfigureFriendlyNameRequest {
162
162
  id?: string;
163
163
  /** physical verification id received from status verification api */
164
164
  ph_id?: string;
165
- /** id recevied from enrollment API */
165
+ /** id received from enrollment API */
166
166
  device_id?: string;
167
167
  /** friendly name for the device */
168
168
  friendly_name?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cidaas-javascript-sdk",
3
- "version": "5.1.0",
3
+ "version": "5.1.3",
4
4
  "author": "cidaas by Widas ID GmbH",
5
5
  "description": "Cidaas native javascript sdk",
6
6
  "license": "MIT",