@stytch/vanilla-js 4.5.0 → 4.5.2
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 +14 -0
- package/dist/b2b/index.d.ts +30 -7
- package/dist/b2b/index.esm.d.ts +30 -7
- package/dist/b2b/index.esm.js +1 -2
- package/dist/b2b/index.headless.d.ts +30 -7
- package/dist/b2b/index.headless.esm.d.ts +30 -7
- package/dist/b2b/index.headless.esm.js +1 -2
- package/dist/b2b/index.headless.js +1 -2
- package/dist/b2b/index.js +1 -2
- package/dist/index.esm.js +853 -803
- package/dist/index.headless.esm.js +1 -2
- package/dist/index.headless.js +1 -2
- package/dist/index.js +1094 -1044
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @stytch/vanilla-js
|
|
2
2
|
|
|
3
|
+
## 4.5.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [060ee3b]
|
|
8
|
+
- Updated dependencies [060ee3b]
|
|
9
|
+
- @stytch/core@2.7.1
|
|
10
|
+
|
|
11
|
+
## 4.5.1
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- fda956c: Fix encoding of Solana wallet signatures in UI components
|
|
16
|
+
|
|
3
17
|
## 4.5.0
|
|
4
18
|
|
|
5
19
|
### Minor Changes
|
package/dist/b2b/index.d.ts
CHANGED
|
@@ -276,18 +276,41 @@ type B2BAuthenticateResponse = ResponseCommon & {
|
|
|
276
276
|
*/
|
|
277
277
|
organization: Organization;
|
|
278
278
|
};
|
|
279
|
-
type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
279
|
+
type B2BAuthenticateResponseWithMFA = Omit<B2BAuthenticateResponse, "member_session"> & ({
|
|
280
280
|
/**
|
|
281
281
|
* The Member Session object.
|
|
282
282
|
* See {@link MemberSession} for details.
|
|
283
283
|
*/
|
|
284
|
-
member_session: MemberSession
|
|
284
|
+
member_session: MemberSession;
|
|
285
285
|
/**
|
|
286
286
|
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
287
287
|
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
288
288
|
* in which case an intermediate_session_token is returned.
|
|
289
289
|
*/
|
|
290
|
-
member_authenticated:
|
|
290
|
+
member_authenticated: true;
|
|
291
|
+
/**
|
|
292
|
+
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
293
|
+
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
294
|
+
* in order to receive a member session. The intermediate_session_token can also be used with discovery endpoints
|
|
295
|
+
* to join a different organization or create a new organization.
|
|
296
|
+
*/
|
|
297
|
+
intermediate_session_token: "";
|
|
298
|
+
/**
|
|
299
|
+
* Contains information about the member's options for completing MFA, if applicable.
|
|
300
|
+
*/
|
|
301
|
+
mfa_required: null;
|
|
302
|
+
} | {
|
|
303
|
+
/**
|
|
304
|
+
* The Member Session object.
|
|
305
|
+
* See {@link MemberSession} for details.
|
|
306
|
+
*/
|
|
307
|
+
member_session: null;
|
|
308
|
+
/**
|
|
309
|
+
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
310
|
+
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
311
|
+
* in which case an intermediate_session_token is returned.
|
|
312
|
+
*/
|
|
313
|
+
member_authenticated: false;
|
|
291
314
|
/**
|
|
292
315
|
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
293
316
|
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
@@ -298,8 +321,8 @@ type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
|
298
321
|
/**
|
|
299
322
|
* Contains information about the member's options for completing MFA, if applicable.
|
|
300
323
|
*/
|
|
301
|
-
mfa_required: MfaRequired
|
|
302
|
-
};
|
|
324
|
+
mfa_required: MfaRequired;
|
|
325
|
+
});
|
|
303
326
|
interface Organization {
|
|
304
327
|
/**
|
|
305
328
|
* Globally unique UUID that identifies an organization in the Stytch API.
|
|
@@ -408,7 +431,7 @@ interface Organization {
|
|
|
408
431
|
}[];
|
|
409
432
|
}
|
|
410
433
|
interface MfaRequired {
|
|
411
|
-
member_options: MemberOptions;
|
|
434
|
+
member_options: MemberOptions | null;
|
|
412
435
|
/**
|
|
413
436
|
* Equal to 'sms_otp' if an OTP code was sent to the member's phone number.
|
|
414
437
|
*/
|
|
@@ -521,7 +544,7 @@ type B2BPasswordResetBySessionOptions = {
|
|
|
521
544
|
*/
|
|
522
545
|
password: string;
|
|
523
546
|
};
|
|
524
|
-
type B2BPasswordResetBySessionResponse =
|
|
547
|
+
type B2BPasswordResetBySessionResponse = B2BAuthenticateResponse;
|
|
525
548
|
type B2BPasswordStrengthCheckOptions = {
|
|
526
549
|
/**
|
|
527
550
|
* The email associated with the password. Provide this for a more accurate strength check.
|
package/dist/b2b/index.esm.d.ts
CHANGED
|
@@ -276,18 +276,41 @@ type B2BAuthenticateResponse = ResponseCommon & {
|
|
|
276
276
|
*/
|
|
277
277
|
organization: Organization;
|
|
278
278
|
};
|
|
279
|
-
type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
279
|
+
type B2BAuthenticateResponseWithMFA = Omit<B2BAuthenticateResponse, "member_session"> & ({
|
|
280
280
|
/**
|
|
281
281
|
* The Member Session object.
|
|
282
282
|
* See {@link MemberSession} for details.
|
|
283
283
|
*/
|
|
284
|
-
member_session: MemberSession
|
|
284
|
+
member_session: MemberSession;
|
|
285
285
|
/**
|
|
286
286
|
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
287
287
|
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
288
288
|
* in which case an intermediate_session_token is returned.
|
|
289
289
|
*/
|
|
290
|
-
member_authenticated:
|
|
290
|
+
member_authenticated: true;
|
|
291
|
+
/**
|
|
292
|
+
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
293
|
+
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
294
|
+
* in order to receive a member session. The intermediate_session_token can also be used with discovery endpoints
|
|
295
|
+
* to join a different organization or create a new organization.
|
|
296
|
+
*/
|
|
297
|
+
intermediate_session_token: "";
|
|
298
|
+
/**
|
|
299
|
+
* Contains information about the member's options for completing MFA, if applicable.
|
|
300
|
+
*/
|
|
301
|
+
mfa_required: null;
|
|
302
|
+
} | {
|
|
303
|
+
/**
|
|
304
|
+
* The Member Session object.
|
|
305
|
+
* See {@link MemberSession} for details.
|
|
306
|
+
*/
|
|
307
|
+
member_session: null;
|
|
308
|
+
/**
|
|
309
|
+
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
310
|
+
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
311
|
+
* in which case an intermediate_session_token is returned.
|
|
312
|
+
*/
|
|
313
|
+
member_authenticated: false;
|
|
291
314
|
/**
|
|
292
315
|
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
293
316
|
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
@@ -298,8 +321,8 @@ type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
|
298
321
|
/**
|
|
299
322
|
* Contains information about the member's options for completing MFA, if applicable.
|
|
300
323
|
*/
|
|
301
|
-
mfa_required: MfaRequired
|
|
302
|
-
};
|
|
324
|
+
mfa_required: MfaRequired;
|
|
325
|
+
});
|
|
303
326
|
interface Organization {
|
|
304
327
|
/**
|
|
305
328
|
* Globally unique UUID that identifies an organization in the Stytch API.
|
|
@@ -408,7 +431,7 @@ interface Organization {
|
|
|
408
431
|
}[];
|
|
409
432
|
}
|
|
410
433
|
interface MfaRequired {
|
|
411
|
-
member_options: MemberOptions;
|
|
434
|
+
member_options: MemberOptions | null;
|
|
412
435
|
/**
|
|
413
436
|
* Equal to 'sms_otp' if an OTP code was sent to the member's phone number.
|
|
414
437
|
*/
|
|
@@ -521,7 +544,7 @@ type B2BPasswordResetBySessionOptions = {
|
|
|
521
544
|
*/
|
|
522
545
|
password: string;
|
|
523
546
|
};
|
|
524
|
-
type B2BPasswordResetBySessionResponse =
|
|
547
|
+
type B2BPasswordResetBySessionResponse = B2BAuthenticateResponse;
|
|
525
548
|
type B2BPasswordStrengthCheckOptions = {
|
|
526
549
|
/**
|
|
527
550
|
* The email associated with the password. Provide this for a more accurate strength check.
|
package/dist/b2b/index.esm.js
CHANGED
|
@@ -419,7 +419,6 @@ function ae(e) {
|
|
|
419
419
|
return new B(e.message);
|
|
420
420
|
case "no_current_session":
|
|
421
421
|
return new I();
|
|
422
|
-
case "no_biometrics_registration":
|
|
423
422
|
case "no_biometrics_registration":
|
|
424
423
|
return new R();
|
|
425
424
|
case "biometrics_unavailable":
|
|
@@ -4001,7 +4000,7 @@ var xt = /*#__PURE__*/function () {
|
|
|
4001
4000
|
},
|
|
4002
4001
|
sdk: {
|
|
4003
4002
|
identifier: "Stytch.js Javascript SDK",
|
|
4004
|
-
version: "4.5.
|
|
4003
|
+
version: "4.5.2"
|
|
4005
4004
|
}
|
|
4006
4005
|
});
|
|
4007
4006
|
}
|
|
@@ -273,18 +273,41 @@ type B2BAuthenticateResponse = ResponseCommon & {
|
|
|
273
273
|
*/
|
|
274
274
|
organization: Organization;
|
|
275
275
|
};
|
|
276
|
-
type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
276
|
+
type B2BAuthenticateResponseWithMFA = Omit<B2BAuthenticateResponse, "member_session"> & ({
|
|
277
277
|
/**
|
|
278
278
|
* The Member Session object.
|
|
279
279
|
* See {@link MemberSession} for details.
|
|
280
280
|
*/
|
|
281
|
-
member_session: MemberSession
|
|
281
|
+
member_session: MemberSession;
|
|
282
282
|
/**
|
|
283
283
|
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
284
284
|
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
285
285
|
* in which case an intermediate_session_token is returned.
|
|
286
286
|
*/
|
|
287
|
-
member_authenticated:
|
|
287
|
+
member_authenticated: true;
|
|
288
|
+
/**
|
|
289
|
+
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
290
|
+
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
291
|
+
* in order to receive a member session. The intermediate_session_token can also be used with discovery endpoints
|
|
292
|
+
* to join a different organization or create a new organization.
|
|
293
|
+
*/
|
|
294
|
+
intermediate_session_token: "";
|
|
295
|
+
/**
|
|
296
|
+
* Contains information about the member's options for completing MFA, if applicable.
|
|
297
|
+
*/
|
|
298
|
+
mfa_required: null;
|
|
299
|
+
} | {
|
|
300
|
+
/**
|
|
301
|
+
* The Member Session object.
|
|
302
|
+
* See {@link MemberSession} for details.
|
|
303
|
+
*/
|
|
304
|
+
member_session: null;
|
|
305
|
+
/**
|
|
306
|
+
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
307
|
+
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
308
|
+
* in which case an intermediate_session_token is returned.
|
|
309
|
+
*/
|
|
310
|
+
member_authenticated: false;
|
|
288
311
|
/**
|
|
289
312
|
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
290
313
|
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
@@ -295,8 +318,8 @@ type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
|
295
318
|
/**
|
|
296
319
|
* Contains information about the member's options for completing MFA, if applicable.
|
|
297
320
|
*/
|
|
298
|
-
mfa_required: MfaRequired
|
|
299
|
-
};
|
|
321
|
+
mfa_required: MfaRequired;
|
|
322
|
+
});
|
|
300
323
|
interface Organization {
|
|
301
324
|
/**
|
|
302
325
|
* Globally unique UUID that identifies an organization in the Stytch API.
|
|
@@ -405,7 +428,7 @@ interface Organization {
|
|
|
405
428
|
}[];
|
|
406
429
|
}
|
|
407
430
|
interface MfaRequired {
|
|
408
|
-
member_options: MemberOptions;
|
|
431
|
+
member_options: MemberOptions | null;
|
|
409
432
|
/**
|
|
410
433
|
* Equal to 'sms_otp' if an OTP code was sent to the member's phone number.
|
|
411
434
|
*/
|
|
@@ -518,7 +541,7 @@ type B2BPasswordResetBySessionOptions = {
|
|
|
518
541
|
*/
|
|
519
542
|
password: string;
|
|
520
543
|
};
|
|
521
|
-
type B2BPasswordResetBySessionResponse =
|
|
544
|
+
type B2BPasswordResetBySessionResponse = B2BAuthenticateResponse;
|
|
522
545
|
type B2BPasswordStrengthCheckOptions = {
|
|
523
546
|
/**
|
|
524
547
|
* The email associated with the password. Provide this for a more accurate strength check.
|
|
@@ -273,18 +273,41 @@ type B2BAuthenticateResponse = ResponseCommon & {
|
|
|
273
273
|
*/
|
|
274
274
|
organization: Organization;
|
|
275
275
|
};
|
|
276
|
-
type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
276
|
+
type B2BAuthenticateResponseWithMFA = Omit<B2BAuthenticateResponse, "member_session"> & ({
|
|
277
277
|
/**
|
|
278
278
|
* The Member Session object.
|
|
279
279
|
* See {@link MemberSession} for details.
|
|
280
280
|
*/
|
|
281
|
-
member_session: MemberSession
|
|
281
|
+
member_session: MemberSession;
|
|
282
282
|
/**
|
|
283
283
|
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
284
284
|
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
285
285
|
* in which case an intermediate_session_token is returned.
|
|
286
286
|
*/
|
|
287
|
-
member_authenticated:
|
|
287
|
+
member_authenticated: true;
|
|
288
|
+
/**
|
|
289
|
+
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
290
|
+
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
291
|
+
* in order to receive a member session. The intermediate_session_token can also be used with discovery endpoints
|
|
292
|
+
* to join a different organization or create a new organization.
|
|
293
|
+
*/
|
|
294
|
+
intermediate_session_token: "";
|
|
295
|
+
/**
|
|
296
|
+
* Contains information about the member's options for completing MFA, if applicable.
|
|
297
|
+
*/
|
|
298
|
+
mfa_required: null;
|
|
299
|
+
} | {
|
|
300
|
+
/**
|
|
301
|
+
* The Member Session object.
|
|
302
|
+
* See {@link MemberSession} for details.
|
|
303
|
+
*/
|
|
304
|
+
member_session: null;
|
|
305
|
+
/**
|
|
306
|
+
* Returns true if the member is fully authenticated, in which case a member session is returned.
|
|
307
|
+
* Returns false if the member still needs to complete a secondary authentication requirement,
|
|
308
|
+
* in which case an intermediate_session_token is returned.
|
|
309
|
+
*/
|
|
310
|
+
member_authenticated: false;
|
|
288
311
|
/**
|
|
289
312
|
* If the intermediate_session_token is present, the member needs to complete MFA.
|
|
290
313
|
* The intermediate_session_token can be passed into a secondary authentication endpoint, such as OTP authenticate,
|
|
@@ -295,8 +318,8 @@ type B2BAuthenticateResponseWithMFA = B2BAuthenticateResponse & {
|
|
|
295
318
|
/**
|
|
296
319
|
* Contains information about the member's options for completing MFA, if applicable.
|
|
297
320
|
*/
|
|
298
|
-
mfa_required: MfaRequired
|
|
299
|
-
};
|
|
321
|
+
mfa_required: MfaRequired;
|
|
322
|
+
});
|
|
300
323
|
interface Organization {
|
|
301
324
|
/**
|
|
302
325
|
* Globally unique UUID that identifies an organization in the Stytch API.
|
|
@@ -405,7 +428,7 @@ interface Organization {
|
|
|
405
428
|
}[];
|
|
406
429
|
}
|
|
407
430
|
interface MfaRequired {
|
|
408
|
-
member_options: MemberOptions;
|
|
431
|
+
member_options: MemberOptions | null;
|
|
409
432
|
/**
|
|
410
433
|
* Equal to 'sms_otp' if an OTP code was sent to the member's phone number.
|
|
411
434
|
*/
|
|
@@ -518,7 +541,7 @@ type B2BPasswordResetBySessionOptions = {
|
|
|
518
541
|
*/
|
|
519
542
|
password: string;
|
|
520
543
|
};
|
|
521
|
-
type B2BPasswordResetBySessionResponse =
|
|
544
|
+
type B2BPasswordResetBySessionResponse = B2BAuthenticateResponse;
|
|
522
545
|
type B2BPasswordStrengthCheckOptions = {
|
|
523
546
|
/**
|
|
524
547
|
* The email associated with the password. Provide this for a more accurate strength check.
|
|
@@ -417,7 +417,6 @@ function se(e) {
|
|
|
417
417
|
return new I(e.message);
|
|
418
418
|
case "no_current_session":
|
|
419
419
|
return new D();
|
|
420
|
-
case "no_biometrics_registration":
|
|
421
420
|
case "no_biometrics_registration":
|
|
422
421
|
return new R();
|
|
423
422
|
case "biometrics_unavailable":
|
|
@@ -3999,7 +3998,7 @@ var Tt = /*#__PURE__*/function () {
|
|
|
3999
3998
|
},
|
|
4000
3999
|
sdk: {
|
|
4001
4000
|
identifier: "Stytch.js Javascript SDK",
|
|
4002
|
-
version: "4.5.
|
|
4001
|
+
version: "4.5.2"
|
|
4003
4002
|
}
|
|
4004
4003
|
});
|
|
4005
4004
|
}
|
|
@@ -3931,7 +3931,7 @@ var vt = /*#__PURE__*/function () {
|
|
|
3931
3931
|
},
|
|
3932
3932
|
sdk: {
|
|
3933
3933
|
identifier: "Stytch.js Javascript SDK",
|
|
3934
|
-
version: "4.5.
|
|
3934
|
+
version: "4.5.2"
|
|
3935
3935
|
}
|
|
3936
3936
|
});
|
|
3937
3937
|
}
|
|
@@ -4662,7 +4662,6 @@ exports.BiometricsFailedError = U, exports.BiometricsUnavailableError = A, expor
|
|
|
4662
4662
|
return new S(e.message);
|
|
4663
4663
|
case "no_current_session":
|
|
4664
4664
|
return new w();
|
|
4665
|
-
case "no_biometrics_registration":
|
|
4666
4665
|
case "no_biometrics_registration":
|
|
4667
4666
|
return new P();
|
|
4668
4667
|
case "biometrics_unavailable":
|
package/dist/b2b/index.js
CHANGED
|
@@ -3933,7 +3933,7 @@ var gt = /*#__PURE__*/function () {
|
|
|
3933
3933
|
},
|
|
3934
3934
|
sdk: {
|
|
3935
3935
|
identifier: "Stytch.js Javascript SDK",
|
|
3936
|
-
version: "4.5.
|
|
3936
|
+
version: "4.5.2"
|
|
3937
3937
|
}
|
|
3938
3938
|
});
|
|
3939
3939
|
}
|
|
@@ -11855,7 +11855,6 @@ exports.BiometricsFailedError = Q, exports.BiometricsUnavailableError = E, expor
|
|
|
11855
11855
|
return new k(e.message);
|
|
11856
11856
|
case "no_current_session":
|
|
11857
11857
|
return new w();
|
|
11858
|
-
case "no_biometrics_registration":
|
|
11859
11858
|
case "no_biometrics_registration":
|
|
11860
11859
|
return new S();
|
|
11861
11860
|
case "biometrics_unavailable":
|