@stytch/vanilla-js 3.0.0 → 3.0.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 +17 -0
- package/dist/b2b/index.d.ts +8 -9
- package/dist/b2b/index.esm.d.ts +8 -9
- package/dist/b2b/index.esm.js +4018 -4073
- package/dist/b2b/index.headless.d.ts +8 -9
- package/dist/b2b/index.headless.esm.d.ts +8 -9
- package/dist/b2b/index.headless.esm.js +359 -401
- package/dist/b2b/index.headless.js +347 -389
- package/dist/b2b/index.js +3961 -4016
- package/dist/index.esm.js +1 -1
- package/dist/index.headless.esm.js +198 -200
- package/dist/index.headless.js +526 -528
- package/dist/index.js +1 -1
- package/package.json +2 -2
|
@@ -402,12 +402,11 @@ type B2BPasswordResetByExistingPasswordOptions = SessionDurationOptions & {
|
|
|
402
402
|
type B2BPasswordResetByExistingPasswordResponse = B2BAuthenticateResponseWithMFA;
|
|
403
403
|
type B2BPasswordResetBySessionOptions = {
|
|
404
404
|
/**
|
|
405
|
-
* The
|
|
405
|
+
* The new password for the Member.
|
|
406
406
|
*/
|
|
407
|
-
organization_id: string;
|
|
408
407
|
password: string;
|
|
409
408
|
};
|
|
410
|
-
type B2BPasswordResetBySessionResponse =
|
|
409
|
+
type B2BPasswordResetBySessionResponse = B2BAuthenticateResponseWithMFA;
|
|
411
410
|
type B2BPasswordStrengthCheckOptions = {
|
|
412
411
|
/**
|
|
413
412
|
* The email associated with the password. Provide this for a more accurate strength check.
|
|
@@ -463,7 +462,7 @@ type B2BPasswordStrengthCheckResponse = MemberResponseCommon & {
|
|
|
463
462
|
};
|
|
464
463
|
interface IHeadlessB2BPasswordClient {
|
|
465
464
|
/**
|
|
466
|
-
* The Authenticate method wraps the {@link https://stytch.com/docs/api/
|
|
465
|
+
* The Authenticate method wraps the {@link https://stytch.com/docs/b2b/api/passwords-authenticate Authenticate} Password API endpoint.
|
|
467
466
|
* This endpoint verifies that the Member has a password currently set, and that the entered password is correct.
|
|
468
467
|
*
|
|
469
468
|
* There are cases where this endpoint will return a `reset_password` error even if the password entered is correct.
|
|
@@ -489,7 +488,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
489
488
|
*/
|
|
490
489
|
authenticate(options: B2BPasswordAuthenticateOptions): Promise<B2BPasswordAuthenticateResponse>;
|
|
491
490
|
/**
|
|
492
|
-
* The resetByEmailStart method wraps the {@link https://stytch.com/docs/api/
|
|
491
|
+
* The resetByEmailStart method wraps the {@link https://stytch.com/docs/b2b/api/email-reset-start Reset By Email Start} Password API endpoint.
|
|
493
492
|
* This endpoint initiates a password reset for the email address provided.
|
|
494
493
|
* This will trigger an email to be sent to the address, containing a magic link that will allow them to set a new password and authenticate.
|
|
495
494
|
*
|
|
@@ -511,7 +510,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
511
510
|
*/
|
|
512
511
|
resetByEmailStart(options: B2BPasswordResetByEmailStartOptions): Promise<B2BPasswordResetByEmailStartResponse>;
|
|
513
512
|
/**
|
|
514
|
-
* The resetByEmail method wraps the {@link https://stytch.com/docs/api/
|
|
513
|
+
* The resetByEmail method wraps the {@link https://stytch.com/docs/b2b/api/email-reset Reset By Email} Password API endpoint.
|
|
515
514
|
* This endpoint the Member’s password and authenticate them.
|
|
516
515
|
* This endpoint checks that the magic link token is valid, hasn't expired, or already been used.
|
|
517
516
|
* The provided password needs to meet our password strength requirements, which can be checked in advance with the {@link IHeadlessB2BPasswordClient#strengthCheck password strength} endpoint.
|
|
@@ -539,7 +538,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
539
538
|
*/
|
|
540
539
|
resetByEmail(options: B2BPasswordResetByEmailOptions): Promise<B2BPasswordResetByEmailResponse>;
|
|
541
540
|
/**
|
|
542
|
-
* The strengthCheck method wraps the {@link https://stytch.com/docs/api/
|
|
541
|
+
* The strengthCheck method wraps the {@link https://stytch.com/docs/b2b/api/strength-check Strength Check} Password API endpoint.
|
|
543
542
|
* This endpoint allows you to check whether or not the Member’s provided password is valid,
|
|
544
543
|
* and to provide feedback to the Member on how to increase the strength of their password.
|
|
545
544
|
*
|
|
@@ -559,7 +558,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
559
558
|
*/
|
|
560
559
|
strengthCheck(options: B2BPasswordStrengthCheckOptions): Promise<B2BPasswordStrengthCheckResponse>;
|
|
561
560
|
/**
|
|
562
|
-
* The resetByExistingPassword method wraps the {@link https://stytch.com/docs/
|
|
561
|
+
* The resetByExistingPassword method wraps the {@link https://stytch.com/docs/b2b/api/existing-reset Reset By Existing Password} API endpoint.
|
|
563
562
|
* If this method succeeds, the Member will be logged in, granted an active session, and the
|
|
564
563
|
* {@link https://stytch.com/docs/sdks/javascript-sdk/resources/cookies-and-session-management session cookies} will be minted and stored in the browser.
|
|
565
564
|
* You can listen for successful login events anywhere in the codebase with the `stytch.session.onChange()` method or `useStytchSession` hook if you are using React.
|
|
@@ -581,7 +580,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
581
580
|
*/
|
|
582
581
|
resetByExistingPassword(options: B2BPasswordResetByExistingPasswordOptions): Promise<B2BPasswordResetByExistingPasswordResponse>;
|
|
583
582
|
/**
|
|
584
|
-
* The resetBySession method wraps the {@link https://stytch.com/docs/
|
|
583
|
+
* The resetBySession method wraps the {@link https://stytch.com/docs/b2b/api/session-reset Reset By Session} API endpoint.
|
|
585
584
|
* If this method succeeds, the Member will be logged in, granted an active session, and the
|
|
586
585
|
* {@link https://stytch.com/docs/sdks/javascript-sdk/resources/cookies-and-session-management session cookies} will be minted and stored in the browser.
|
|
587
586
|
* You can listen for successful login events anywhere in the codebase with the `stytch.session.onChange()` method or `useStytchSession` hook if you are using React.
|
|
@@ -402,12 +402,11 @@ type B2BPasswordResetByExistingPasswordOptions = SessionDurationOptions & {
|
|
|
402
402
|
type B2BPasswordResetByExistingPasswordResponse = B2BAuthenticateResponseWithMFA;
|
|
403
403
|
type B2BPasswordResetBySessionOptions = {
|
|
404
404
|
/**
|
|
405
|
-
* The
|
|
405
|
+
* The new password for the Member.
|
|
406
406
|
*/
|
|
407
|
-
organization_id: string;
|
|
408
407
|
password: string;
|
|
409
408
|
};
|
|
410
|
-
type B2BPasswordResetBySessionResponse =
|
|
409
|
+
type B2BPasswordResetBySessionResponse = B2BAuthenticateResponseWithMFA;
|
|
411
410
|
type B2BPasswordStrengthCheckOptions = {
|
|
412
411
|
/**
|
|
413
412
|
* The email associated with the password. Provide this for a more accurate strength check.
|
|
@@ -463,7 +462,7 @@ type B2BPasswordStrengthCheckResponse = MemberResponseCommon & {
|
|
|
463
462
|
};
|
|
464
463
|
interface IHeadlessB2BPasswordClient {
|
|
465
464
|
/**
|
|
466
|
-
* The Authenticate method wraps the {@link https://stytch.com/docs/api/
|
|
465
|
+
* The Authenticate method wraps the {@link https://stytch.com/docs/b2b/api/passwords-authenticate Authenticate} Password API endpoint.
|
|
467
466
|
* This endpoint verifies that the Member has a password currently set, and that the entered password is correct.
|
|
468
467
|
*
|
|
469
468
|
* There are cases where this endpoint will return a `reset_password` error even if the password entered is correct.
|
|
@@ -489,7 +488,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
489
488
|
*/
|
|
490
489
|
authenticate(options: B2BPasswordAuthenticateOptions): Promise<B2BPasswordAuthenticateResponse>;
|
|
491
490
|
/**
|
|
492
|
-
* The resetByEmailStart method wraps the {@link https://stytch.com/docs/api/
|
|
491
|
+
* The resetByEmailStart method wraps the {@link https://stytch.com/docs/b2b/api/email-reset-start Reset By Email Start} Password API endpoint.
|
|
493
492
|
* This endpoint initiates a password reset for the email address provided.
|
|
494
493
|
* This will trigger an email to be sent to the address, containing a magic link that will allow them to set a new password and authenticate.
|
|
495
494
|
*
|
|
@@ -511,7 +510,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
511
510
|
*/
|
|
512
511
|
resetByEmailStart(options: B2BPasswordResetByEmailStartOptions): Promise<B2BPasswordResetByEmailStartResponse>;
|
|
513
512
|
/**
|
|
514
|
-
* The resetByEmail method wraps the {@link https://stytch.com/docs/api/
|
|
513
|
+
* The resetByEmail method wraps the {@link https://stytch.com/docs/b2b/api/email-reset Reset By Email} Password API endpoint.
|
|
515
514
|
* This endpoint the Member’s password and authenticate them.
|
|
516
515
|
* This endpoint checks that the magic link token is valid, hasn't expired, or already been used.
|
|
517
516
|
* The provided password needs to meet our password strength requirements, which can be checked in advance with the {@link IHeadlessB2BPasswordClient#strengthCheck password strength} endpoint.
|
|
@@ -539,7 +538,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
539
538
|
*/
|
|
540
539
|
resetByEmail(options: B2BPasswordResetByEmailOptions): Promise<B2BPasswordResetByEmailResponse>;
|
|
541
540
|
/**
|
|
542
|
-
* The strengthCheck method wraps the {@link https://stytch.com/docs/api/
|
|
541
|
+
* The strengthCheck method wraps the {@link https://stytch.com/docs/b2b/api/strength-check Strength Check} Password API endpoint.
|
|
543
542
|
* This endpoint allows you to check whether or not the Member’s provided password is valid,
|
|
544
543
|
* and to provide feedback to the Member on how to increase the strength of their password.
|
|
545
544
|
*
|
|
@@ -559,7 +558,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
559
558
|
*/
|
|
560
559
|
strengthCheck(options: B2BPasswordStrengthCheckOptions): Promise<B2BPasswordStrengthCheckResponse>;
|
|
561
560
|
/**
|
|
562
|
-
* The resetByExistingPassword method wraps the {@link https://stytch.com/docs/
|
|
561
|
+
* The resetByExistingPassword method wraps the {@link https://stytch.com/docs/b2b/api/existing-reset Reset By Existing Password} API endpoint.
|
|
563
562
|
* If this method succeeds, the Member will be logged in, granted an active session, and the
|
|
564
563
|
* {@link https://stytch.com/docs/sdks/javascript-sdk/resources/cookies-and-session-management session cookies} will be minted and stored in the browser.
|
|
565
564
|
* You can listen for successful login events anywhere in the codebase with the `stytch.session.onChange()` method or `useStytchSession` hook if you are using React.
|
|
@@ -581,7 +580,7 @@ interface IHeadlessB2BPasswordClient {
|
|
|
581
580
|
*/
|
|
582
581
|
resetByExistingPassword(options: B2BPasswordResetByExistingPasswordOptions): Promise<B2BPasswordResetByExistingPasswordResponse>;
|
|
583
582
|
/**
|
|
584
|
-
* The resetBySession method wraps the {@link https://stytch.com/docs/
|
|
583
|
+
* The resetBySession method wraps the {@link https://stytch.com/docs/b2b/api/session-reset Reset By Session} API endpoint.
|
|
585
584
|
* If this method succeeds, the Member will be logged in, granted an active session, and the
|
|
586
585
|
* {@link https://stytch.com/docs/sdks/javascript-sdk/resources/cookies-and-session-management session cookies} will be minted and stored in the browser.
|
|
587
586
|
* You can listen for successful login events anywhere in the codebase with the `stytch.session.onChange()` method or `useStytchSession` hook if you are using React.
|