@bagelink/auth 1.6.51 → 1.6.57
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 +284 -219
- package/dist/Callback-BHqVaZZm.cjs +4 -0
- package/dist/Callback-C-XghN_z.js +4 -0
- package/dist/ForgotPasswordPage-BV9tyhHl.cjs +4 -0
- package/dist/ForgotPasswordPage-DvttMGb0.js +4 -0
- package/dist/LoginPage-hv1wc54S.cjs +4 -0
- package/dist/LoginPage-klj1NV4J.js +4 -0
- package/dist/ResetPasswordPage-COPrJmW8.cjs +4 -0
- package/dist/ResetPasswordPage-nvQ4uupb.js +4 -0
- package/dist/SignupPage-m36w9PLJ.cjs +4 -0
- package/dist/SignupPage-oUFYApYW.js +4 -0
- package/dist/api.d.ts +115 -0
- package/dist/components/auth/ForgotPasswordForm.vue.d.ts +23 -0
- package/dist/components/auth/LoginForm.vue.d.ts +58 -0
- package/dist/components/auth/ResetPasswordForm.vue.d.ts +28 -0
- package/dist/components/auth/SignupForm.vue.d.ts +34 -0
- package/dist/components/index.d.ts +4 -0
- package/dist/constants.d.ts +34 -0
- package/dist/index.cjs +1227 -30
- package/dist/index.d.ts +16 -631
- package/dist/index.mjs +1242 -24
- package/dist/pages/Callback.vue.d.ts +2 -0
- package/dist/pages/ForgotPasswordPage.vue.d.ts +13 -0
- package/dist/pages/LoginPage.vue.d.ts +38 -0
- package/dist/pages/ResetPasswordPage.vue.d.ts +13 -0
- package/dist/pages/SignupPage.vue.d.ts +16 -0
- package/dist/routes.d.ts +49 -0
- package/dist/sso.d.ts +145 -0
- package/dist/types/index.d.ts +41 -0
- package/dist/types.d.ts +254 -0
- package/dist/useAuth.d.ts +112 -0
- package/dist/utils.d.ts +11 -0
- package/package.json +11 -13
- package/src/components/auth/ForgotPasswordForm.vue +97 -0
- package/src/components/auth/LoginForm.vue +257 -0
- package/src/components/auth/ResetPasswordForm.vue +146 -0
- package/src/components/auth/SignupForm.vue +224 -0
- package/src/components/index.ts +5 -0
- package/src/constants.ts +10 -0
- package/src/index.ts +26 -1
- package/src/pages/Callback.vue +183 -0
- package/src/pages/ForgotPasswordPage.vue +42 -0
- package/src/pages/LoginPage.vue +68 -0
- package/src/pages/ResetPasswordPage.vue +47 -0
- package/src/pages/SignupPage.vue +46 -0
- package/src/routes.ts +122 -0
- package/src/types/index.ts +45 -0
- package/dist/index.d.cts +0 -631
- package/dist/index.d.mts +0 -631
package/dist/api.d.ts
ADDED
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { RegisterRequest, UpdateAccountRequest, ChangePasswordRequest, ResetPasswordRequest, SendVerificationRequest, AuthenticationAccount, LoginResponse, RegisterResponse, LogoutResponse, GetMeResponse, UpdateMeResponse, DeleteMeResponse, GetAccountResponse, UpdateAccountResponse, DeleteAccountResponse, ActivateAccountResponse, DeactivateAccountResponse, ChangePasswordResponse, ForgotPasswordResponse, ResetPasswordResponse, VerifyResetTokenResponse, SendVerificationResponse, VerifyEmailResponse, RefreshSessionResponse, GetSessionsResponse, DeleteSessionResponse, DeleteAllSessionsResponse, CleanupSessionsResponse, GetMethodsResponse, SSOProvider, SSOInitiateRequest, SSOCallbackRequest, SSOLinkRequest, SSOInitiateResponse, SSOCallbackResponse, SSOLinkResponse, SSOUnlinkResponse } from './types';
|
|
2
|
+
export declare class AuthApi {
|
|
3
|
+
private api;
|
|
4
|
+
constructor(baseURL?: string);
|
|
5
|
+
private setupInterceptors;
|
|
6
|
+
/**
|
|
7
|
+
* Get available authentication methods
|
|
8
|
+
*/
|
|
9
|
+
getAuthMethods(): Promise<GetMethodsResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Register a new account
|
|
12
|
+
*/
|
|
13
|
+
register(data: RegisterRequest): Promise<RegisterResponse>;
|
|
14
|
+
/**
|
|
15
|
+
* Login with password
|
|
16
|
+
*/
|
|
17
|
+
login(email: string, password: string): Promise<LoginResponse>;
|
|
18
|
+
/**
|
|
19
|
+
* Logout and clear session
|
|
20
|
+
*/
|
|
21
|
+
logout(): Promise<LogoutResponse>;
|
|
22
|
+
/**
|
|
23
|
+
* Refresh current session
|
|
24
|
+
*/
|
|
25
|
+
refreshSession(): Promise<RefreshSessionResponse>;
|
|
26
|
+
/**
|
|
27
|
+
* Initiate SSO login flow
|
|
28
|
+
* Returns authorization URL to redirect user to
|
|
29
|
+
*/
|
|
30
|
+
initiateSSO(data: SSOInitiateRequest): Promise<SSOInitiateResponse>;
|
|
31
|
+
/**
|
|
32
|
+
* Complete SSO login after callback from provider
|
|
33
|
+
*/
|
|
34
|
+
ssoCallback(data: SSOCallbackRequest): Promise<SSOCallbackResponse>;
|
|
35
|
+
/**
|
|
36
|
+
* Link an SSO provider to existing account
|
|
37
|
+
*/
|
|
38
|
+
linkSSOProvider(data: SSOLinkRequest): Promise<SSOLinkResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Unlink an SSO provider from account
|
|
41
|
+
*/
|
|
42
|
+
unlinkSSOProvider(provider: SSOProvider): Promise<SSOUnlinkResponse>;
|
|
43
|
+
/**
|
|
44
|
+
* Get current user account info
|
|
45
|
+
*/
|
|
46
|
+
getCurrentUser(): Promise<GetMeResponse>;
|
|
47
|
+
/**
|
|
48
|
+
* Update current user profile
|
|
49
|
+
*/
|
|
50
|
+
updateCurrentUser(data: UpdateAccountRequest): Promise<UpdateMeResponse>;
|
|
51
|
+
/**
|
|
52
|
+
* Delete current user account
|
|
53
|
+
*/
|
|
54
|
+
deleteCurrentUser(): Promise<DeleteMeResponse>;
|
|
55
|
+
/**
|
|
56
|
+
* Get account information by ID
|
|
57
|
+
*/
|
|
58
|
+
getAccount(accountId: string): Promise<GetAccountResponse>;
|
|
59
|
+
/**
|
|
60
|
+
* Update account by ID
|
|
61
|
+
*/
|
|
62
|
+
updateAccount(accountId: string, data: UpdateAccountRequest): Promise<UpdateAccountResponse>;
|
|
63
|
+
/**
|
|
64
|
+
* Delete account by ID
|
|
65
|
+
*/
|
|
66
|
+
deleteAccount(accountId: string): Promise<DeleteAccountResponse>;
|
|
67
|
+
/**
|
|
68
|
+
* Activate account by ID
|
|
69
|
+
*/
|
|
70
|
+
activateAccount(accountId: string): Promise<ActivateAccountResponse>;
|
|
71
|
+
/**
|
|
72
|
+
* Deactivate account by ID
|
|
73
|
+
*/
|
|
74
|
+
deactivateAccount(accountId: string): Promise<DeactivateAccountResponse>;
|
|
75
|
+
/**
|
|
76
|
+
* Change password (requires current password)
|
|
77
|
+
*/
|
|
78
|
+
changePassword(data: ChangePasswordRequest): Promise<ChangePasswordResponse>;
|
|
79
|
+
/**
|
|
80
|
+
* Initiate forgot password flow
|
|
81
|
+
*/
|
|
82
|
+
forgotPassword(email: string): Promise<ForgotPasswordResponse>;
|
|
83
|
+
/**
|
|
84
|
+
* Verify password reset token
|
|
85
|
+
*/
|
|
86
|
+
verifyResetToken(token: string): Promise<VerifyResetTokenResponse>;
|
|
87
|
+
/**
|
|
88
|
+
* Reset password with token
|
|
89
|
+
*/
|
|
90
|
+
resetPassword(data: ResetPasswordRequest): Promise<ResetPasswordResponse>;
|
|
91
|
+
/**
|
|
92
|
+
* Send email verification
|
|
93
|
+
*/
|
|
94
|
+
sendVerification(data?: SendVerificationRequest, user?: AuthenticationAccount): Promise<SendVerificationResponse>;
|
|
95
|
+
/**
|
|
96
|
+
* Verify email with token
|
|
97
|
+
*/
|
|
98
|
+
verifyEmail(token: string): Promise<VerifyEmailResponse>;
|
|
99
|
+
/**
|
|
100
|
+
* Get sessions for an account
|
|
101
|
+
*/
|
|
102
|
+
getSessions(accountId: string): Promise<GetSessionsResponse>;
|
|
103
|
+
/**
|
|
104
|
+
* Revoke a specific session
|
|
105
|
+
*/
|
|
106
|
+
revokeSession(sessionToken: string): Promise<DeleteSessionResponse>;
|
|
107
|
+
/**
|
|
108
|
+
* Revoke all sessions for an account
|
|
109
|
+
*/
|
|
110
|
+
revokeAllSessions(accountId: string): Promise<DeleteAllSessionsResponse>;
|
|
111
|
+
/**
|
|
112
|
+
* Cleanup expired sessions (admin)
|
|
113
|
+
*/
|
|
114
|
+
cleanupSessions(): Promise<CleanupSessionsResponse>;
|
|
115
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface ForgotPasswordTexts {
|
|
2
|
+
title?: string;
|
|
3
|
+
emailLabel?: string;
|
|
4
|
+
submitButton?: string;
|
|
5
|
+
backToLogin?: string;
|
|
6
|
+
emailSentTitle?: string;
|
|
7
|
+
emailSentMessage?: string;
|
|
8
|
+
}
|
|
9
|
+
interface Props {
|
|
10
|
+
emailSent?: boolean;
|
|
11
|
+
useHebrewDefaults?: boolean;
|
|
12
|
+
texts?: Partial<ForgotPasswordTexts>;
|
|
13
|
+
}
|
|
14
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
15
|
+
switchForm: (form: string) => any;
|
|
16
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
17
|
+
onSwitchForm?: ((form: string) => any) | undefined;
|
|
18
|
+
}>, {
|
|
19
|
+
emailSent: boolean;
|
|
20
|
+
useHebrewDefaults: boolean;
|
|
21
|
+
texts: Partial<ForgotPasswordTexts>;
|
|
22
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
23
|
+
export default _default;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
export interface LoginTexts {
|
|
2
|
+
title?: string;
|
|
3
|
+
emailLabel?: string;
|
|
4
|
+
passwordLabel?: string;
|
|
5
|
+
forgotPassword?: string;
|
|
6
|
+
loginButton?: string;
|
|
7
|
+
signupButton?: string;
|
|
8
|
+
orText?: string;
|
|
9
|
+
githubButton?: string;
|
|
10
|
+
googleButton?: string;
|
|
11
|
+
microsoftButton?: string;
|
|
12
|
+
appleButton?: string;
|
|
13
|
+
oktaButton?: string;
|
|
14
|
+
facebookButton?: string;
|
|
15
|
+
}
|
|
16
|
+
interface Props {
|
|
17
|
+
hideRegularLogin?: boolean;
|
|
18
|
+
showForgotPassword?: boolean;
|
|
19
|
+
showSignupButton?: boolean;
|
|
20
|
+
github?: boolean;
|
|
21
|
+
google?: boolean;
|
|
22
|
+
microsoft?: boolean;
|
|
23
|
+
apple?: boolean;
|
|
24
|
+
okta?: boolean;
|
|
25
|
+
facebook?: boolean;
|
|
26
|
+
ssoOutline?: boolean;
|
|
27
|
+
ssoShowValue?: boolean;
|
|
28
|
+
ssoSize?: 'xs' | 's' | 'm' | 'l' | 'xl' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
|
|
29
|
+
ssoAlign?: boolean;
|
|
30
|
+
ssoBrandBackground?: boolean;
|
|
31
|
+
useHebrewDefaults?: boolean;
|
|
32
|
+
errorState?: 'normal' | 'email-required' | 'email-invalid' | 'password-required' | 'invalid-credentials' | 'server-error';
|
|
33
|
+
texts?: Partial<LoginTexts>;
|
|
34
|
+
}
|
|
35
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
36
|
+
switchForm: (form: string) => any;
|
|
37
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
38
|
+
onSwitchForm?: ((form: string) => any) | undefined;
|
|
39
|
+
}>, {
|
|
40
|
+
google: boolean;
|
|
41
|
+
microsoft: boolean;
|
|
42
|
+
github: boolean;
|
|
43
|
+
okta: boolean;
|
|
44
|
+
apple: boolean;
|
|
45
|
+
facebook: boolean;
|
|
46
|
+
useHebrewDefaults: boolean;
|
|
47
|
+
texts: Partial<LoginTexts>;
|
|
48
|
+
hideRegularLogin: boolean;
|
|
49
|
+
showForgotPassword: boolean;
|
|
50
|
+
showSignupButton: boolean;
|
|
51
|
+
ssoOutline: boolean;
|
|
52
|
+
ssoShowValue: boolean;
|
|
53
|
+
ssoSize: "xs" | "s" | "m" | "l" | "xl" | "extra-small" | "small" | "medium" | "large" | "extra-large";
|
|
54
|
+
ssoAlign: boolean;
|
|
55
|
+
ssoBrandBackground: boolean;
|
|
56
|
+
errorState: "normal" | "email-required" | "email-invalid" | "password-required" | "invalid-credentials" | "server-error";
|
|
57
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
|
|
58
|
+
export default _default;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface ResetPasswordTexts {
|
|
2
|
+
title?: string;
|
|
3
|
+
invalidLinkTitle?: string;
|
|
4
|
+
invalidLinkMessage?: string;
|
|
5
|
+
newPasswordLabel?: string;
|
|
6
|
+
confirmPasswordLabel?: string;
|
|
7
|
+
submitButton?: string;
|
|
8
|
+
backToLogin?: string;
|
|
9
|
+
passwordMismatchError?: string;
|
|
10
|
+
invalidTokenError?: string;
|
|
11
|
+
successTitle?: string;
|
|
12
|
+
successMessage?: string;
|
|
13
|
+
goToLogin?: string;
|
|
14
|
+
}
|
|
15
|
+
interface Props {
|
|
16
|
+
token?: string;
|
|
17
|
+
showSuccess?: boolean;
|
|
18
|
+
useHebrewDefaults?: boolean;
|
|
19
|
+
texts?: Partial<ResetPasswordTexts>;
|
|
20
|
+
}
|
|
21
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
22
|
+
switchForm: (form: string) => any;
|
|
23
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
24
|
+
onSwitchForm?: ((form: string) => any) | undefined;
|
|
25
|
+
}>, {
|
|
26
|
+
useHebrewDefaults: boolean;
|
|
27
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
28
|
+
export default _default;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface SignupTexts {
|
|
2
|
+
title?: string;
|
|
3
|
+
firstNameLabel?: string;
|
|
4
|
+
lastNameLabel?: string;
|
|
5
|
+
emailLabel?: string;
|
|
6
|
+
passwordLabel?: string;
|
|
7
|
+
confirmPasswordLabel?: string;
|
|
8
|
+
signupButton?: string;
|
|
9
|
+
alreadyHaveAccount?: string;
|
|
10
|
+
emailRequiredError?: string;
|
|
11
|
+
emailInvalidError?: string;
|
|
12
|
+
passwordRequiredError?: string;
|
|
13
|
+
passwordTooShortError?: string;
|
|
14
|
+
passwordMismatchError?: string;
|
|
15
|
+
firstNameRequiredError?: string;
|
|
16
|
+
lastNameRequiredError?: string;
|
|
17
|
+
}
|
|
18
|
+
interface Props {
|
|
19
|
+
showNames?: boolean;
|
|
20
|
+
useHebrewDefaults?: boolean;
|
|
21
|
+
errorState?: 'normal' | 'email-required' | 'email-invalid' | 'password-short' | 'password-mismatch' | 'name-required' | 'server-error';
|
|
22
|
+
texts?: Partial<SignupTexts>;
|
|
23
|
+
}
|
|
24
|
+
declare const _default: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
|
|
25
|
+
switchForm: (form: string) => any;
|
|
26
|
+
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
27
|
+
onSwitchForm?: ((form: string) => any) | undefined;
|
|
28
|
+
}>, {
|
|
29
|
+
useHebrewDefaults: boolean;
|
|
30
|
+
texts: Partial<SignupTexts>;
|
|
31
|
+
errorState: "normal" | "email-required" | "email-invalid" | "password-short" | "password-mismatch" | "name-required" | "server-error";
|
|
32
|
+
showNames: boolean;
|
|
33
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, HTMLFormElement>;
|
|
34
|
+
export default _default;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { default as ForgotPasswordForm } from './auth/ForgotPasswordForm.vue';
|
|
2
|
+
export { default as LoginForm } from './auth/LoginForm.vue';
|
|
3
|
+
export { default as ResetPasswordForm } from './auth/ResetPasswordForm.vue';
|
|
4
|
+
export { default as SignupForm } from './auth/SignupForm.vue';
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export declare const INTAKE_WORKFLOW_ID = "fdba1933-0964-4850-b52a-7a4324175790";
|
|
2
|
+
export declare const DEFAULT_AGENT_ID = "fdba1933-0964-4850-b52a-7a4324175790";
|
|
3
|
+
export declare const providers: {
|
|
4
|
+
github: {
|
|
5
|
+
name: string;
|
|
6
|
+
icon: string;
|
|
7
|
+
color: string;
|
|
8
|
+
};
|
|
9
|
+
google: {
|
|
10
|
+
name: string;
|
|
11
|
+
icon: string;
|
|
12
|
+
color: string;
|
|
13
|
+
};
|
|
14
|
+
microsoft: {
|
|
15
|
+
name: string;
|
|
16
|
+
icon: string;
|
|
17
|
+
color: string;
|
|
18
|
+
};
|
|
19
|
+
apple: {
|
|
20
|
+
name: string;
|
|
21
|
+
icon: string;
|
|
22
|
+
color: string;
|
|
23
|
+
};
|
|
24
|
+
okta: {
|
|
25
|
+
name: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
color: string;
|
|
28
|
+
};
|
|
29
|
+
facebook: {
|
|
30
|
+
name: string;
|
|
31
|
+
icon: string;
|
|
32
|
+
color: string;
|
|
33
|
+
};
|
|
34
|
+
};
|