@thetechfossil/auth2 1.2.20 → 1.2.22
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/README.md +7 -0
- package/dist/index.components.d.mts +14 -1
- package/dist/index.components.d.ts +14 -1
- package/dist/index.components.js +529 -67
- package/dist/index.components.js.map +1 -1
- package/dist/index.components.mjs +529 -68
- package/dist/index.components.mjs.map +1 -1
- package/dist/index.d.mts +19 -2
- package/dist/index.d.ts +19 -2
- package/dist/index.js +530 -67
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +530 -68
- package/dist/index.mjs.map +1 -1
- package/dist/index.next.d.mts +17 -1
- package/dist/index.next.d.ts +17 -1
- package/dist/index.next.js +529 -67
- package/dist/index.next.js.map +1 -1
- package/dist/index.next.mjs +529 -68
- package/dist/index.next.mjs.map +1 -1
- package/dist/index.next.server.d.mts +3 -0
- package/dist/index.next.server.d.ts +3 -0
- package/dist/index.next.server.js +85 -8
- package/dist/index.next.server.js.map +1 -1
- package/dist/index.next.server.mjs +85 -8
- package/dist/index.next.server.mjs.map +1 -1
- package/dist/index.node.d.mts +3 -0
- package/dist/index.node.d.ts +3 -0
- package/dist/index.node.js +85 -8
- package/dist/index.node.js.map +1 -1
- package/dist/index.node.mjs +85 -8
- package/dist/index.node.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -186,6 +186,8 @@ declare class AuthService {
|
|
|
186
186
|
constructor(config: AuthConfig);
|
|
187
187
|
private loadTokenFromStorage;
|
|
188
188
|
private saveTokenToStorage;
|
|
189
|
+
private setTokenCookie;
|
|
190
|
+
private removeTokenCookie;
|
|
189
191
|
private removeTokenFromStorage;
|
|
190
192
|
private connectSocket;
|
|
191
193
|
private disconnectSocket;
|
|
@@ -274,6 +276,7 @@ declare class HttpClient {
|
|
|
274
276
|
private frontendBaseUrl;
|
|
275
277
|
private baseUrl;
|
|
276
278
|
constructor(baseUrl: string, defaultHeaders?: Record<string, string>);
|
|
279
|
+
private createUserFriendlyError;
|
|
277
280
|
get<T>(endpoint: string, headers?: Record<string, string>): Promise<T>;
|
|
278
281
|
post<T>(endpoint: string, data?: any, headers?: Record<string, string>): Promise<T>;
|
|
279
282
|
put<T>(endpoint: string, data?: any, headers?: Record<string, string>): Promise<T>;
|
|
@@ -501,6 +504,19 @@ interface UserProfileProps {
|
|
|
501
504
|
}
|
|
502
505
|
declare const UserProfile: React.FC<UserProfileProps>;
|
|
503
506
|
|
|
507
|
+
interface SuperAdminSignInProps {
|
|
508
|
+
redirectUrl?: string;
|
|
509
|
+
appearance?: {
|
|
510
|
+
elements?: {
|
|
511
|
+
formButtonPrimary?: React.CSSProperties;
|
|
512
|
+
card?: React.CSSProperties;
|
|
513
|
+
headerTitle?: React.CSSProperties;
|
|
514
|
+
formFieldInput?: React.CSSProperties;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
declare const SuperAdminSignIn: React.FC<SuperAdminSignInProps>;
|
|
519
|
+
|
|
504
520
|
interface PhoneInputProps {
|
|
505
521
|
value: string;
|
|
506
522
|
onChange: (value: string) => void;
|
|
@@ -612,12 +628,13 @@ declare const index$1_ResetPassword: typeof ResetPassword;
|
|
|
612
628
|
declare const index$1_SignIn: typeof SignIn;
|
|
613
629
|
declare const index$1_SignOut: typeof SignOut;
|
|
614
630
|
declare const index$1_SignUp: typeof SignUp;
|
|
631
|
+
declare const index$1_SuperAdminSignIn: typeof SuperAdminSignIn;
|
|
615
632
|
declare const index$1_UserButton: typeof UserButton;
|
|
616
633
|
declare const index$1_UserProfile: typeof UserProfile;
|
|
617
634
|
declare const index$1_VerifyEmail: typeof VerifyEmail;
|
|
618
635
|
declare const index$1_useAuthTheme: typeof useAuthTheme;
|
|
619
636
|
declare namespace index$1 {
|
|
620
|
-
export { index$1_AuthFlow as AuthFlow, index$1_AuthProvider as AuthProvider, index$1_AuthThemeProvider as AuthThemeProvider, index$1_AvatarManager as AvatarManager, type index$1_AvatarManagerProps as AvatarManagerProps, index$1_AvatarUploader as AvatarUploader, type index$1_AvatarUploaderProps as AvatarUploaderProps, index$1_ChangePassword as ChangePassword, index$1_EmailVerificationPage as EmailVerificationPage, index$1_ForgotPassword as ForgotPassword, index$1_LoginForm as LoginForm, index$1_OtpForm as OtpForm, index$1_PhoneInput as PhoneInput, index$1_ProtectedRoute as ProtectedRoute, index$1_PublicRoute as PublicRoute, index$1_RegisterForm as RegisterForm, type index$1_RegisterFormProps as RegisterFormProps, index$1_ResetPassword as ResetPassword, index$1_SignIn as SignIn, index$1_SignOut as SignOut, index$1_SignUp as SignUp, index$1_UserButton as UserButton, index$1_UserProfile as UserProfile, index$1_VerifyEmail as VerifyEmail, useAuth$1 as useAuth, useAuth as useAuthLegacy, index$1_useAuthTheme as useAuthTheme };
|
|
637
|
+
export { index$1_AuthFlow as AuthFlow, index$1_AuthProvider as AuthProvider, index$1_AuthThemeProvider as AuthThemeProvider, index$1_AvatarManager as AvatarManager, type index$1_AvatarManagerProps as AvatarManagerProps, index$1_AvatarUploader as AvatarUploader, type index$1_AvatarUploaderProps as AvatarUploaderProps, index$1_ChangePassword as ChangePassword, index$1_EmailVerificationPage as EmailVerificationPage, index$1_ForgotPassword as ForgotPassword, index$1_LoginForm as LoginForm, index$1_OtpForm as OtpForm, index$1_PhoneInput as PhoneInput, index$1_ProtectedRoute as ProtectedRoute, index$1_PublicRoute as PublicRoute, index$1_RegisterForm as RegisterForm, type index$1_RegisterFormProps as RegisterFormProps, index$1_ResetPassword as ResetPassword, index$1_SignIn as SignIn, index$1_SignOut as SignOut, index$1_SignUp as SignUp, index$1_SuperAdminSignIn as SuperAdminSignIn, index$1_UserButton as UserButton, index$1_UserProfile as UserProfile, index$1_VerifyEmail as VerifyEmail, useAuth$1 as useAuth, useAuth as useAuthLegacy, index$1_useAuthTheme as useAuthTheme };
|
|
621
638
|
}
|
|
622
639
|
|
|
623
640
|
declare class AuthClient extends AuthService {
|
|
@@ -670,4 +687,4 @@ declare namespace index {
|
|
|
670
687
|
export { index_AuthClient as AuthClient, index_TokenVerifier as TokenVerifier, index_createTokenVerifier as createTokenVerifier, index_getTokenVerifier as getTokenVerifier, index_verifyToken as verifyToken };
|
|
671
688
|
}
|
|
672
689
|
|
|
673
|
-
export { type AuditLog, type AuthConfig, AuthFlow, AuthProvider, type AuthResponse, AuthService, AvatarManager, AvatarUploader, ChangePassword, type CsrfTokenResponse, EmailVerificationPage, ForgotPassword, HttpClient, type LinkedAccount, type LoginData, LoginForm, type MFASetup, type OAuthConfig, type OAuthProvider, OtpForm, ProtectedRoute, PublicRoute, type RegisterData, RegisterForm, ResetPassword, type Session, SignIn, SignOut, SignUp, type SocketConfig, type SocketEventHandler, SocketService, type UpdateUserData, type UpfilesConfig, type UseAuthReturn, type User, UserButton, UserProfile, type VerifyData, VerifyEmail, index as node, index$1 as react, useAuth$1 as useAuth };
|
|
690
|
+
export { type AuditLog, type AuthConfig, AuthFlow, AuthProvider, type AuthResponse, AuthService, AvatarManager, AvatarUploader, ChangePassword, type CsrfTokenResponse, EmailVerificationPage, ForgotPassword, HttpClient, type LinkedAccount, type LoginData, LoginForm, type MFASetup, type OAuthConfig, type OAuthProvider, OtpForm, ProtectedRoute, PublicRoute, type RegisterData, RegisterForm, ResetPassword, type Session, SignIn, SignOut, SignUp, type SocketConfig, type SocketEventHandler, SocketService, SuperAdminSignIn, type UpdateUserData, type UpfilesConfig, type UseAuthReturn, type User, UserButton, UserProfile, type VerifyData, VerifyEmail, index as node, index$1 as react, useAuth$1 as useAuth };
|
package/dist/index.d.ts
CHANGED
|
@@ -186,6 +186,8 @@ declare class AuthService {
|
|
|
186
186
|
constructor(config: AuthConfig);
|
|
187
187
|
private loadTokenFromStorage;
|
|
188
188
|
private saveTokenToStorage;
|
|
189
|
+
private setTokenCookie;
|
|
190
|
+
private removeTokenCookie;
|
|
189
191
|
private removeTokenFromStorage;
|
|
190
192
|
private connectSocket;
|
|
191
193
|
private disconnectSocket;
|
|
@@ -274,6 +276,7 @@ declare class HttpClient {
|
|
|
274
276
|
private frontendBaseUrl;
|
|
275
277
|
private baseUrl;
|
|
276
278
|
constructor(baseUrl: string, defaultHeaders?: Record<string, string>);
|
|
279
|
+
private createUserFriendlyError;
|
|
277
280
|
get<T>(endpoint: string, headers?: Record<string, string>): Promise<T>;
|
|
278
281
|
post<T>(endpoint: string, data?: any, headers?: Record<string, string>): Promise<T>;
|
|
279
282
|
put<T>(endpoint: string, data?: any, headers?: Record<string, string>): Promise<T>;
|
|
@@ -501,6 +504,19 @@ interface UserProfileProps {
|
|
|
501
504
|
}
|
|
502
505
|
declare const UserProfile: React.FC<UserProfileProps>;
|
|
503
506
|
|
|
507
|
+
interface SuperAdminSignInProps {
|
|
508
|
+
redirectUrl?: string;
|
|
509
|
+
appearance?: {
|
|
510
|
+
elements?: {
|
|
511
|
+
formButtonPrimary?: React.CSSProperties;
|
|
512
|
+
card?: React.CSSProperties;
|
|
513
|
+
headerTitle?: React.CSSProperties;
|
|
514
|
+
formFieldInput?: React.CSSProperties;
|
|
515
|
+
};
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
declare const SuperAdminSignIn: React.FC<SuperAdminSignInProps>;
|
|
519
|
+
|
|
504
520
|
interface PhoneInputProps {
|
|
505
521
|
value: string;
|
|
506
522
|
onChange: (value: string) => void;
|
|
@@ -612,12 +628,13 @@ declare const index$1_ResetPassword: typeof ResetPassword;
|
|
|
612
628
|
declare const index$1_SignIn: typeof SignIn;
|
|
613
629
|
declare const index$1_SignOut: typeof SignOut;
|
|
614
630
|
declare const index$1_SignUp: typeof SignUp;
|
|
631
|
+
declare const index$1_SuperAdminSignIn: typeof SuperAdminSignIn;
|
|
615
632
|
declare const index$1_UserButton: typeof UserButton;
|
|
616
633
|
declare const index$1_UserProfile: typeof UserProfile;
|
|
617
634
|
declare const index$1_VerifyEmail: typeof VerifyEmail;
|
|
618
635
|
declare const index$1_useAuthTheme: typeof useAuthTheme;
|
|
619
636
|
declare namespace index$1 {
|
|
620
|
-
export { index$1_AuthFlow as AuthFlow, index$1_AuthProvider as AuthProvider, index$1_AuthThemeProvider as AuthThemeProvider, index$1_AvatarManager as AvatarManager, type index$1_AvatarManagerProps as AvatarManagerProps, index$1_AvatarUploader as AvatarUploader, type index$1_AvatarUploaderProps as AvatarUploaderProps, index$1_ChangePassword as ChangePassword, index$1_EmailVerificationPage as EmailVerificationPage, index$1_ForgotPassword as ForgotPassword, index$1_LoginForm as LoginForm, index$1_OtpForm as OtpForm, index$1_PhoneInput as PhoneInput, index$1_ProtectedRoute as ProtectedRoute, index$1_PublicRoute as PublicRoute, index$1_RegisterForm as RegisterForm, type index$1_RegisterFormProps as RegisterFormProps, index$1_ResetPassword as ResetPassword, index$1_SignIn as SignIn, index$1_SignOut as SignOut, index$1_SignUp as SignUp, index$1_UserButton as UserButton, index$1_UserProfile as UserProfile, index$1_VerifyEmail as VerifyEmail, useAuth$1 as useAuth, useAuth as useAuthLegacy, index$1_useAuthTheme as useAuthTheme };
|
|
637
|
+
export { index$1_AuthFlow as AuthFlow, index$1_AuthProvider as AuthProvider, index$1_AuthThemeProvider as AuthThemeProvider, index$1_AvatarManager as AvatarManager, type index$1_AvatarManagerProps as AvatarManagerProps, index$1_AvatarUploader as AvatarUploader, type index$1_AvatarUploaderProps as AvatarUploaderProps, index$1_ChangePassword as ChangePassword, index$1_EmailVerificationPage as EmailVerificationPage, index$1_ForgotPassword as ForgotPassword, index$1_LoginForm as LoginForm, index$1_OtpForm as OtpForm, index$1_PhoneInput as PhoneInput, index$1_ProtectedRoute as ProtectedRoute, index$1_PublicRoute as PublicRoute, index$1_RegisterForm as RegisterForm, type index$1_RegisterFormProps as RegisterFormProps, index$1_ResetPassword as ResetPassword, index$1_SignIn as SignIn, index$1_SignOut as SignOut, index$1_SignUp as SignUp, index$1_SuperAdminSignIn as SuperAdminSignIn, index$1_UserButton as UserButton, index$1_UserProfile as UserProfile, index$1_VerifyEmail as VerifyEmail, useAuth$1 as useAuth, useAuth as useAuthLegacy, index$1_useAuthTheme as useAuthTheme };
|
|
621
638
|
}
|
|
622
639
|
|
|
623
640
|
declare class AuthClient extends AuthService {
|
|
@@ -670,4 +687,4 @@ declare namespace index {
|
|
|
670
687
|
export { index_AuthClient as AuthClient, index_TokenVerifier as TokenVerifier, index_createTokenVerifier as createTokenVerifier, index_getTokenVerifier as getTokenVerifier, index_verifyToken as verifyToken };
|
|
671
688
|
}
|
|
672
689
|
|
|
673
|
-
export { type AuditLog, type AuthConfig, AuthFlow, AuthProvider, type AuthResponse, AuthService, AvatarManager, AvatarUploader, ChangePassword, type CsrfTokenResponse, EmailVerificationPage, ForgotPassword, HttpClient, type LinkedAccount, type LoginData, LoginForm, type MFASetup, type OAuthConfig, type OAuthProvider, OtpForm, ProtectedRoute, PublicRoute, type RegisterData, RegisterForm, ResetPassword, type Session, SignIn, SignOut, SignUp, type SocketConfig, type SocketEventHandler, SocketService, type UpdateUserData, type UpfilesConfig, type UseAuthReturn, type User, UserButton, UserProfile, type VerifyData, VerifyEmail, index as node, index$1 as react, useAuth$1 as useAuth };
|
|
690
|
+
export { type AuditLog, type AuthConfig, AuthFlow, AuthProvider, type AuthResponse, AuthService, AvatarManager, AvatarUploader, ChangePassword, type CsrfTokenResponse, EmailVerificationPage, ForgotPassword, HttpClient, type LinkedAccount, type LoginData, LoginForm, type MFASetup, type OAuthConfig, type OAuthProvider, OtpForm, ProtectedRoute, PublicRoute, type RegisterData, RegisterForm, ResetPassword, type Session, SignIn, SignOut, SignUp, type SocketConfig, type SocketEventHandler, SocketService, SuperAdminSignIn, type UpdateUserData, type UpfilesConfig, type UseAuthReturn, type User, UserButton, UserProfile, type VerifyData, VerifyEmail, index as node, index$1 as react, useAuth$1 as useAuth };
|