@supabase/gotrue-js 2.3.2 → 2.4.1
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/dist/main/GoTrueClient.d.ts +1 -2
- package/dist/main/GoTrueClient.d.ts.map +1 -1
- package/dist/main/GoTrueClient.js +14 -19
- package/dist/main/GoTrueClient.js.map +1 -1
- package/dist/main/lib/helpers.d.ts.map +1 -1
- package/dist/main/lib/helpers.js +5 -0
- package/dist/main/lib/helpers.js.map +1 -1
- package/dist/main/lib/types.d.ts +0 -48
- package/dist/main/lib/types.d.ts.map +1 -1
- package/dist/main/lib/version.d.ts +1 -1
- package/dist/main/lib/version.js +1 -1
- package/dist/module/GoTrueClient.d.ts +1 -2
- package/dist/module/GoTrueClient.d.ts.map +1 -1
- package/dist/module/GoTrueClient.js +15 -20
- package/dist/module/GoTrueClient.js.map +1 -1
- package/dist/module/lib/helpers.d.ts.map +1 -1
- package/dist/module/lib/helpers.js +5 -0
- package/dist/module/lib/helpers.js.map +1 -1
- package/dist/module/lib/types.d.ts +0 -48
- package/dist/module/lib/types.d.ts.map +1 -1
- package/dist/module/lib/version.d.ts +1 -1
- package/dist/module/lib/version.js +1 -1
- package/package.json +1 -1
- package/src/GoTrueClient.ts +18 -22
- package/src/lib/helpers.ts +8 -0
- package/src/lib/types.ts +0 -48
- package/src/lib/version.ts +1 -1
package/src/lib/types.ts
CHANGED
|
@@ -20,9 +20,6 @@ export type Provider =
|
|
|
20
20
|
| 'twitter'
|
|
21
21
|
| 'workos'
|
|
22
22
|
|
|
23
|
-
/**
|
|
24
|
-
* @experimental
|
|
25
|
-
*/
|
|
26
23
|
export type AuthChangeEventMFA = 'MFA_CHALLENGE_VERIFIED'
|
|
27
24
|
|
|
28
25
|
export type AuthChangeEvent =
|
|
@@ -597,26 +594,17 @@ export type GenerateLinkType =
|
|
|
597
594
|
| 'email_change_current'
|
|
598
595
|
| 'email_change_new'
|
|
599
596
|
|
|
600
|
-
/**
|
|
601
|
-
* @experimental
|
|
602
|
-
*/
|
|
603
597
|
export type MFAEnrollParams = {
|
|
604
598
|
factorType: 'totp'
|
|
605
599
|
issuer?: string
|
|
606
600
|
friendlyName?: string
|
|
607
601
|
}
|
|
608
602
|
|
|
609
|
-
/**
|
|
610
|
-
* @experimental
|
|
611
|
-
*/
|
|
612
603
|
export type MFAUnenrollParams = {
|
|
613
604
|
/** ID of the factor being unenrolled. */
|
|
614
605
|
factorId: string
|
|
615
606
|
}
|
|
616
607
|
|
|
617
|
-
/**
|
|
618
|
-
* @experimental
|
|
619
|
-
*/
|
|
620
608
|
export type MFAVerifyParams = {
|
|
621
609
|
/** ID of the factor being verified. */
|
|
622
610
|
factorId: string
|
|
@@ -628,17 +616,11 @@ export type MFAVerifyParams = {
|
|
|
628
616
|
code: string
|
|
629
617
|
}
|
|
630
618
|
|
|
631
|
-
/**
|
|
632
|
-
* @experimental
|
|
633
|
-
*/
|
|
634
619
|
export type MFAChallengeParams = {
|
|
635
620
|
/** ID of the factor to be challenged. */
|
|
636
621
|
factorId: string
|
|
637
622
|
}
|
|
638
623
|
|
|
639
|
-
/**
|
|
640
|
-
* @experimental
|
|
641
|
-
*/
|
|
642
624
|
export type MFAChallengeAndVerifyParams = {
|
|
643
625
|
/** ID of the factor being verified. */
|
|
644
626
|
factorId: string
|
|
@@ -646,9 +628,6 @@ export type MFAChallengeAndVerifyParams = {
|
|
|
646
628
|
code: string
|
|
647
629
|
}
|
|
648
630
|
|
|
649
|
-
/**
|
|
650
|
-
* @experimental
|
|
651
|
-
*/
|
|
652
631
|
export type AuthMFAVerifyResponse =
|
|
653
632
|
| {
|
|
654
633
|
data: {
|
|
@@ -674,9 +653,6 @@ export type AuthMFAVerifyResponse =
|
|
|
674
653
|
error: AuthError
|
|
675
654
|
}
|
|
676
655
|
|
|
677
|
-
/**
|
|
678
|
-
* @experimental
|
|
679
|
-
*/
|
|
680
656
|
export type AuthMFAEnrollResponse =
|
|
681
657
|
| {
|
|
682
658
|
data: {
|
|
@@ -710,9 +686,6 @@ export type AuthMFAEnrollResponse =
|
|
|
710
686
|
error: AuthError
|
|
711
687
|
}
|
|
712
688
|
|
|
713
|
-
/**
|
|
714
|
-
* @experimental
|
|
715
|
-
*/
|
|
716
689
|
export type AuthMFAUnenrollResponse =
|
|
717
690
|
| {
|
|
718
691
|
data: {
|
|
@@ -723,9 +696,6 @@ export type AuthMFAUnenrollResponse =
|
|
|
723
696
|
}
|
|
724
697
|
| { data: null; error: AuthError }
|
|
725
698
|
|
|
726
|
-
/**
|
|
727
|
-
* @experimental
|
|
728
|
-
*/
|
|
729
699
|
export type AuthMFAChallengeResponse =
|
|
730
700
|
| {
|
|
731
701
|
data: {
|
|
@@ -739,9 +709,6 @@ export type AuthMFAChallengeResponse =
|
|
|
739
709
|
}
|
|
740
710
|
| { data: null; error: AuthError }
|
|
741
711
|
|
|
742
|
-
/**
|
|
743
|
-
* @experimental
|
|
744
|
-
*/
|
|
745
712
|
export type AuthMFAListFactorsResponse =
|
|
746
713
|
| {
|
|
747
714
|
data: {
|
|
@@ -755,14 +722,8 @@ export type AuthMFAListFactorsResponse =
|
|
|
755
722
|
}
|
|
756
723
|
| { data: null; error: AuthError }
|
|
757
724
|
|
|
758
|
-
/**
|
|
759
|
-
* @experimental
|
|
760
|
-
*/
|
|
761
725
|
export type AuthenticatorAssuranceLevels = 'aal1' | 'aal2'
|
|
762
726
|
|
|
763
|
-
/**
|
|
764
|
-
* @experimental
|
|
765
|
-
*/
|
|
766
727
|
export type AuthMFAGetAuthenticatorAssuranceLevelResponse =
|
|
767
728
|
| {
|
|
768
729
|
data: {
|
|
@@ -791,7 +752,6 @@ export type AuthMFAGetAuthenticatorAssuranceLevelResponse =
|
|
|
791
752
|
/**
|
|
792
753
|
* Contains the full multi-factor authentication API.
|
|
793
754
|
*
|
|
794
|
-
* @experimental
|
|
795
755
|
*/
|
|
796
756
|
export interface GoTrueMFAApi {
|
|
797
757
|
/**
|
|
@@ -809,7 +769,6 @@ export interface GoTrueMFAApi {
|
|
|
809
769
|
* @see {@link GoTrueMFAApi#verify}
|
|
810
770
|
* @see {@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}
|
|
811
771
|
*
|
|
812
|
-
* @experimental
|
|
813
772
|
*/
|
|
814
773
|
enroll(params: MFAEnrollParams): Promise<AuthMFAEnrollResponse>
|
|
815
774
|
|
|
@@ -818,7 +777,6 @@ export interface GoTrueMFAApi {
|
|
|
818
777
|
* factor. Provide the challenge ID and verification code by calling
|
|
819
778
|
* {@link GoTrueMFAApi#verify}.
|
|
820
779
|
*
|
|
821
|
-
* @experimental
|
|
822
780
|
*/
|
|
823
781
|
challenge(params: MFAChallengeParams): Promise<AuthMFAChallengeResponse>
|
|
824
782
|
|
|
@@ -828,7 +786,6 @@ export interface GoTrueMFAApi {
|
|
|
828
786
|
*
|
|
829
787
|
* @see {@link GoTrueMFAApi#challenge}
|
|
830
788
|
*
|
|
831
|
-
* @experimental
|
|
832
789
|
*/
|
|
833
790
|
verify(params: MFAVerifyParams): Promise<AuthMFAVerifyResponse>
|
|
834
791
|
|
|
@@ -837,7 +794,6 @@ export interface GoTrueMFAApi {
|
|
|
837
794
|
* and it's not necessary to unenroll them. Unenrolling a verified MFA factor
|
|
838
795
|
* cannot be done from a session with an `aal1` authenticator level.
|
|
839
796
|
*
|
|
840
|
-
* @experimental
|
|
841
797
|
*/
|
|
842
798
|
unenroll(params: MFAUnenrollParams): Promise<AuthMFAUnenrollResponse>
|
|
843
799
|
|
|
@@ -847,7 +803,6 @@ export interface GoTrueMFAApi {
|
|
|
847
803
|
*
|
|
848
804
|
* @see {@link GoTrueMFAApi#challengeAndVerify}
|
|
849
805
|
*
|
|
850
|
-
* @experimental
|
|
851
806
|
*/
|
|
852
807
|
challengeAndVerify(params: MFAChallengeAndVerifyParams): Promise<AuthMFAVerifyResponse>
|
|
853
808
|
|
|
@@ -862,7 +817,6 @@ export interface GoTrueMFAApi {
|
|
|
862
817
|
* @see {@link GoTrueMFAApi#getAuthenticatorAssuranceLevel}
|
|
863
818
|
* @see {@link GoTrueClient#getUser}
|
|
864
819
|
*
|
|
865
|
-
* @experimental
|
|
866
820
|
*/
|
|
867
821
|
listFactors(): Promise<AuthMFAListFactorsResponse>
|
|
868
822
|
|
|
@@ -878,7 +832,6 @@ export interface GoTrueMFAApi {
|
|
|
878
832
|
* and rarely uses the network. You can use this to check whether the current
|
|
879
833
|
* user needs to be shown a screen to verify their MFA factors.
|
|
880
834
|
*
|
|
881
|
-
* @experimental
|
|
882
835
|
*/
|
|
883
836
|
getAuthenticatorAssuranceLevel(): Promise<AuthMFAGetAuthenticatorAssuranceLevelResponse>
|
|
884
837
|
}
|
|
@@ -937,7 +890,6 @@ export interface GoTrueAdminMFAApi {
|
|
|
937
890
|
/**
|
|
938
891
|
* Lists all factors attached to a user.
|
|
939
892
|
*
|
|
940
|
-
* @experimental
|
|
941
893
|
*/
|
|
942
894
|
listFactors(params: AuthMFAAdminListFactorsParams): Promise<AuthMFAAdminListFactorsResponse>
|
|
943
895
|
|
package/src/lib/version.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Generated by genversion.
|
|
2
|
-
export const version = '2.
|
|
2
|
+
export const version = '2.4.1'
|