@better-auth-ui/core 1.6.8 → 1.6.10
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/config/auth-config.d.ts +1 -1
- package/dist/create-auth-plugin-CnH7jMHA.js +199 -0
- package/dist/index.js +103 -11
- package/dist/lib/auth-mutation-keys.d.ts +9 -20
- package/dist/lib/auth-plugin.d.ts +5 -6
- package/dist/lib/auth-query-keys.d.ts +6 -6
- package/dist/lib/create-auth-plugin.d.ts +5 -21
- package/dist/lib/localization.d.ts +2 -2
- package/dist/lib/view-paths.d.ts +0 -4
- package/dist/plugins/api-key/api-key-mutation-keys.d.ts +4 -2
- package/dist/plugins/api-key/api-key-plugin.d.ts +23 -2
- package/dist/plugins/api-key/api-key-query-keys.d.ts +6 -0
- package/dist/plugins/delete-user/delete-user-localization.d.ts +3 -3
- package/dist/plugins/delete-user/delete-user-mutation-keys.d.ts +7 -0
- package/dist/plugins/delete-user/delete-user-plugin.d.ts +4 -4
- package/dist/plugins/magic-link/magic-link-plugin.d.ts +2 -2
- package/dist/plugins/multi-session/multi-session-mutation-keys.d.ts +11 -0
- package/dist/plugins/multi-session/multi-session-plugin.d.ts +2 -2
- package/dist/plugins/multi-session/multi-session-query-keys.d.ts +6 -0
- package/dist/plugins/organization/organization-localization.d.ts +115 -0
- package/dist/plugins/organization/organization-mutation-keys.d.ts +40 -0
- package/dist/plugins/organization/organization-plugin.d.ts +152 -0
- package/dist/plugins/organization/organization-query-keys.d.ts +40 -0
- package/dist/plugins/organization/organization-view-paths.d.ts +19 -0
- package/dist/plugins/passkey/passkey-plugin.d.ts +2 -2
- package/dist/plugins/passkey/passkey-query-keys.d.ts +6 -0
- package/dist/plugins/theme/theme-plugin.d.ts +2 -2
- package/dist/plugins/username/username-mutation-keys.d.ts +17 -0
- package/dist/plugins/username/username-plugin.d.ts +3 -3
- package/dist/plugins.d.ts +28 -0
- package/dist/plugins.js +360 -18
- package/package.json +7 -6
- package/src/config/auth-config.ts +1 -1
- package/src/lib/auth-mutation-keys.ts +11 -24
- package/src/lib/auth-plugin.ts +4 -5
- package/src/lib/auth-query-keys.ts +6 -23
- package/src/lib/create-auth-plugin.ts +9 -26
- package/src/lib/localization.ts +4 -4
- package/src/lib/view-paths.ts +0 -4
- package/src/plugins/api-key/api-key-mutation-keys.ts +4 -2
- package/src/plugins/api-key/api-key-plugin.ts +22 -1
- package/src/plugins/api-key/api-key-query-keys.ts +13 -0
- package/src/plugins/delete-user/delete-user-localization.ts +3 -3
- package/src/plugins/delete-user/delete-user-mutation-keys.ts +7 -0
- package/src/plugins/multi-session/multi-session-mutation-keys.ts +11 -0
- package/src/plugins/multi-session/multi-session-query-keys.ts +13 -0
- package/src/plugins/organization/organization-localization.ts +123 -0
- package/src/plugins/organization/organization-mutation-keys.ts +52 -0
- package/src/plugins/organization/organization-plugin.ts +112 -0
- package/src/plugins/organization/organization-query-keys.ts +86 -0
- package/src/plugins/organization/organization-view-paths.ts +20 -0
- package/src/plugins/passkey/passkey-query-keys.ts +13 -0
- package/src/plugins/username/username-mutation-keys.ts +17 -0
- package/src/plugins.ts +28 -0
- package/dist/config/additional-fields-config.js +0 -27
- package/dist/config/auth-config.js +0 -32
- package/dist/lib/auth-mutation-keys.js +0 -57
- package/dist/lib/auth-query-keys.js +0 -39
- package/dist/lib/base-paths.js +0 -8
- package/dist/lib/create-auth-plugin.js +0 -9
- package/dist/lib/localization.js +0 -81
- package/dist/lib/provider-names.js +0 -43
- package/dist/lib/utils.js +0 -48
- package/dist/lib/view-paths.js +0 -16
- package/dist/plugins/api-key/api-key-localization.js +0 -16
- package/dist/plugins/api-key/api-key-mutation-keys.js +0 -15
- package/dist/plugins/api-key/api-key-plugin.js +0 -9
- package/dist/plugins/delete-user/delete-user-localization.js +0 -9
- package/dist/plugins/delete-user/delete-user-plugin.js +0 -12
- package/dist/plugins/index.d.ts +0 -17
- package/dist/plugins/magic-link/magic-link-localization.js +0 -8
- package/dist/plugins/magic-link/magic-link-mutation-keys.js +0 -8
- package/dist/plugins/magic-link/magic-link-plugin.js +0 -12
- package/dist/plugins/multi-session/multi-session-localization.js +0 -9
- package/dist/plugins/multi-session/multi-session-plugin.js +0 -9
- package/dist/plugins/passkey/passkey-localization.js +0 -14
- package/dist/plugins/passkey/passkey-mutation-keys.js +0 -20
- package/dist/plugins/passkey/passkey-plugin.js +0 -9
- package/dist/plugins/theme/theme-localization.js +0 -10
- package/dist/plugins/theme/theme-plugin.js +0 -18
- package/dist/plugins/username/username-localization.js +0 -12
- package/dist/plugins/username/username-plugin.js +0 -33
- package/src/plugins/index.ts +0 -17
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
//#region src/lib/auth-mutation-keys.ts
|
|
2
|
-
var e = {
|
|
3
|
-
all: ["auth"],
|
|
4
|
-
signIn: {
|
|
5
|
-
all: ["auth", "signIn"],
|
|
6
|
-
email: [
|
|
7
|
-
"auth",
|
|
8
|
-
"signIn",
|
|
9
|
-
"email"
|
|
10
|
-
],
|
|
11
|
-
social: [
|
|
12
|
-
"auth",
|
|
13
|
-
"signIn",
|
|
14
|
-
"social"
|
|
15
|
-
],
|
|
16
|
-
username: [
|
|
17
|
-
"auth",
|
|
18
|
-
"signIn",
|
|
19
|
-
"username"
|
|
20
|
-
]
|
|
21
|
-
},
|
|
22
|
-
signUp: {
|
|
23
|
-
all: ["auth", "signUp"],
|
|
24
|
-
email: [
|
|
25
|
-
"auth",
|
|
26
|
-
"signUp",
|
|
27
|
-
"email"
|
|
28
|
-
]
|
|
29
|
-
},
|
|
30
|
-
signOut: ["auth", "signOut"],
|
|
31
|
-
requestPasswordReset: ["auth", "requestPasswordReset"],
|
|
32
|
-
resetPassword: ["auth", "resetPassword"],
|
|
33
|
-
sendVerificationEmail: ["auth", "sendVerificationEmail"],
|
|
34
|
-
multiSession: {
|
|
35
|
-
all: ["auth", "multiSession"],
|
|
36
|
-
revoke: [
|
|
37
|
-
"auth",
|
|
38
|
-
"multiSession",
|
|
39
|
-
"revoke"
|
|
40
|
-
],
|
|
41
|
-
setActive: [
|
|
42
|
-
"auth",
|
|
43
|
-
"multiSession",
|
|
44
|
-
"setActive"
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
changeEmail: ["auth", "changeEmail"],
|
|
48
|
-
changePassword: ["auth", "changePassword"],
|
|
49
|
-
deleteUser: ["auth", "deleteUser"],
|
|
50
|
-
linkSocial: ["auth", "linkSocial"],
|
|
51
|
-
revokeSession: ["auth", "revokeSession"],
|
|
52
|
-
unlinkAccount: ["auth", "unlinkAccount"],
|
|
53
|
-
updateUser: ["auth", "updateUser"],
|
|
54
|
-
isUsernameAvailable: ["auth", "isUsernameAvailable"]
|
|
55
|
-
};
|
|
56
|
-
//#endregion
|
|
57
|
-
export { e as authMutationKeys };
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
//#region src/lib/auth-query-keys.ts
|
|
2
|
-
var e = {
|
|
3
|
-
all: ["auth"],
|
|
4
|
-
session: ["auth", "getSession"],
|
|
5
|
-
users: () => [...e.all, "user"],
|
|
6
|
-
user: (t) => [...e.users(), t],
|
|
7
|
-
listDeviceSessions: (t, n) => [
|
|
8
|
-
...e.user(t),
|
|
9
|
-
"listDeviceSessions",
|
|
10
|
-
n ?? null
|
|
11
|
-
],
|
|
12
|
-
listPasskeys: (t, n) => [
|
|
13
|
-
...e.user(t),
|
|
14
|
-
"listPasskeys",
|
|
15
|
-
n ?? null
|
|
16
|
-
],
|
|
17
|
-
listApiKeys: (t, n) => [
|
|
18
|
-
...e.user(t),
|
|
19
|
-
"listApiKeys",
|
|
20
|
-
n ?? null
|
|
21
|
-
],
|
|
22
|
-
accountInfo: (t, n) => [
|
|
23
|
-
...e.user(t),
|
|
24
|
-
"accountInfo",
|
|
25
|
-
n ?? null
|
|
26
|
-
],
|
|
27
|
-
listAccounts: (t, n) => [
|
|
28
|
-
...e.user(t),
|
|
29
|
-
"listAccounts",
|
|
30
|
-
n ?? null
|
|
31
|
-
],
|
|
32
|
-
listSessions: (t, n) => [
|
|
33
|
-
...e.user(t),
|
|
34
|
-
"listSessions",
|
|
35
|
-
n ?? null
|
|
36
|
-
]
|
|
37
|
-
};
|
|
38
|
-
//#endregion
|
|
39
|
-
export { e as authQueryKeys };
|
package/dist/lib/base-paths.js
DELETED
package/dist/lib/localization.js
DELETED
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
//#region src/lib/localization.ts
|
|
2
|
-
var e = {
|
|
3
|
-
auth: {
|
|
4
|
-
account: "Account",
|
|
5
|
-
alreadyHaveAnAccount: "Already have an account?",
|
|
6
|
-
confirmPassword: "Confirm password",
|
|
7
|
-
confirmPasswordPlaceholder: "Confirm your password",
|
|
8
|
-
continueWith: "Continue with {{provider}}",
|
|
9
|
-
email: "Email",
|
|
10
|
-
emailPlaceholder: "Enter your email",
|
|
11
|
-
forgotPassword: "Forgot Password",
|
|
12
|
-
forgotPasswordLink: "Forgot password?",
|
|
13
|
-
hidePassword: "Hide password",
|
|
14
|
-
invalidResetPasswordToken: "Invalid reset password token",
|
|
15
|
-
name: "Name",
|
|
16
|
-
namePlaceholder: "Enter your name",
|
|
17
|
-
needToCreateAnAccount: "Need to create an account?",
|
|
18
|
-
newPassword: "New password",
|
|
19
|
-
newPasswordPlaceholder: "Enter your new password",
|
|
20
|
-
or: "OR",
|
|
21
|
-
password: "Password",
|
|
22
|
-
passwordPlaceholder: "Enter your password",
|
|
23
|
-
passwordResetEmailSent: "Password reset email sent",
|
|
24
|
-
passwordResetSuccess: "Password reset successfully",
|
|
25
|
-
passwordsDoNotMatch: "Passwords do not match",
|
|
26
|
-
rememberMe: "Remember me",
|
|
27
|
-
rememberYourPassword: "Remember your password?",
|
|
28
|
-
resend: "Resend",
|
|
29
|
-
resetPassword: "Reset Password",
|
|
30
|
-
sendResetLink: "Send reset link",
|
|
31
|
-
showPassword: "Show password",
|
|
32
|
-
signIn: "Sign In",
|
|
33
|
-
signOut: "Sign Out",
|
|
34
|
-
signUp: "Sign Up",
|
|
35
|
-
verificationEmailSent: "Verification email sent!",
|
|
36
|
-
verifyYourEmail: "Verify your email"
|
|
37
|
-
},
|
|
38
|
-
settings: {
|
|
39
|
-
account: "Account",
|
|
40
|
-
accountUnlinked: "Account unlinked",
|
|
41
|
-
active: "Active",
|
|
42
|
-
activeSessions: "Active sessions",
|
|
43
|
-
avatar: "Avatar",
|
|
44
|
-
currentSession: "Current session",
|
|
45
|
-
avatarChangedSuccess: "Avatar changed successfully",
|
|
46
|
-
avatarDeletedSuccess: "Avatar deleted successfully",
|
|
47
|
-
changeAvatar: "Change avatar",
|
|
48
|
-
deleteAvatar: "Delete avatar",
|
|
49
|
-
link: "Link",
|
|
50
|
-
linkedAccounts: "Linked accounts",
|
|
51
|
-
linkProvider: "Link your {{provider}} account",
|
|
52
|
-
cancel: "Cancel",
|
|
53
|
-
copyToClipboard: "Copy to clipboard",
|
|
54
|
-
changeEmail: "Change email",
|
|
55
|
-
changeEmailSuccess: "Check your email to confirm the change",
|
|
56
|
-
changePassword: "Change password",
|
|
57
|
-
changePasswordSuccess: "Password changed successfully",
|
|
58
|
-
currentPassword: "Current password",
|
|
59
|
-
currentPasswordPlaceholder: "Enter your current password",
|
|
60
|
-
dangerZone: "Danger zone",
|
|
61
|
-
delete: "Delete",
|
|
62
|
-
optional: "Optional",
|
|
63
|
-
profile: "Profile",
|
|
64
|
-
profileUpdatedSuccess: "Profile updated successfully",
|
|
65
|
-
revoke: "Revoke",
|
|
66
|
-
revokeSession: "Revoke session",
|
|
67
|
-
revokeSessionSuccess: "Session revoked successfully",
|
|
68
|
-
saveChanges: "Save changes",
|
|
69
|
-
setPassword: "Set password",
|
|
70
|
-
setPasswordDescription: "You don't have a password yet. Request a reset link to set one up.",
|
|
71
|
-
security: "Security",
|
|
72
|
-
settings: "Settings",
|
|
73
|
-
time: "Time",
|
|
74
|
-
unlinkProvider: "Unlink {{provider}}",
|
|
75
|
-
updateEmail: "Update email",
|
|
76
|
-
updatePassword: "Update password",
|
|
77
|
-
uploadAvatar: "Upload avatar"
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
//#endregion
|
|
81
|
-
export { e as localization };
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
//#region src/lib/provider-names.ts
|
|
2
|
-
var e = {
|
|
3
|
-
apple: "Apple",
|
|
4
|
-
atlassian: "Atlassian",
|
|
5
|
-
cognito: "Cognito",
|
|
6
|
-
discord: "Discord",
|
|
7
|
-
dropbox: "Dropbox",
|
|
8
|
-
facebook: "Facebook",
|
|
9
|
-
figma: "Figma",
|
|
10
|
-
github: "GitHub",
|
|
11
|
-
gitlab: "GitLab",
|
|
12
|
-
google: "Google",
|
|
13
|
-
huggingface: "Hugging Face",
|
|
14
|
-
kakao: "Kakao",
|
|
15
|
-
kick: "Kick",
|
|
16
|
-
line: "LINE",
|
|
17
|
-
linear: "Linear",
|
|
18
|
-
linkedin: "LinkedIn",
|
|
19
|
-
microsoft: "Microsoft",
|
|
20
|
-
naver: "Naver",
|
|
21
|
-
notion: "Notion",
|
|
22
|
-
paybin: "Paybin",
|
|
23
|
-
paypal: "PayPal",
|
|
24
|
-
polar: "Polar",
|
|
25
|
-
railway: "Railway",
|
|
26
|
-
reddit: "Reddit",
|
|
27
|
-
roblox: "Roblox",
|
|
28
|
-
salesforce: "Salesforce",
|
|
29
|
-
slack: "Slack",
|
|
30
|
-
spotify: "Spotify",
|
|
31
|
-
tiktok: "TikTok",
|
|
32
|
-
twitch: "Twitch",
|
|
33
|
-
twitter: "X",
|
|
34
|
-
vercel: "Vercel",
|
|
35
|
-
vk: "VK",
|
|
36
|
-
wechat: "WeChat",
|
|
37
|
-
zoom: "Zoom"
|
|
38
|
-
};
|
|
39
|
-
function t(t) {
|
|
40
|
-
return e[t] || t.charAt(0).toUpperCase() + t.slice(1);
|
|
41
|
-
}
|
|
42
|
-
//#endregion
|
|
43
|
-
export { t as getProviderName, e as providerNames };
|
package/dist/lib/utils.js
DELETED
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
//#region src/lib/utils.ts
|
|
2
|
-
function e(e) {
|
|
3
|
-
return typeof e == "object" && !!e && !Array.isArray(e);
|
|
4
|
-
}
|
|
5
|
-
function t(t) {
|
|
6
|
-
return !(!e(t) || t instanceof Date || t instanceof RegExp);
|
|
7
|
-
}
|
|
8
|
-
function n(e, t = 256, n = "png") {
|
|
9
|
-
let r = t, i = n === "inherit" ? e.name.split(".").pop() : n, a = n === "inherit" ? e.type : `image/${n === "jpg" ? "jpeg" : n}`;
|
|
10
|
-
return new Promise((t, n) => {
|
|
11
|
-
let o = new Image(), s = URL.createObjectURL(e);
|
|
12
|
-
o.onload = () => {
|
|
13
|
-
URL.revokeObjectURL(s);
|
|
14
|
-
let { naturalWidth: c, naturalHeight: l } = o, u = Math.min(c, l), d = (c - u) / 2, f = (l - u) / 2, p = Math.min(u, r), m = document.createElement("canvas");
|
|
15
|
-
m.width = p, m.height = p;
|
|
16
|
-
let h = m.getContext("2d");
|
|
17
|
-
if (!h) {
|
|
18
|
-
n(/* @__PURE__ */ Error("Could not get canvas context"));
|
|
19
|
-
return;
|
|
20
|
-
}
|
|
21
|
-
h.drawImage(o, d, f, u, u, 0, 0, p, p), m.toBlob((r) => {
|
|
22
|
-
if (!r) {
|
|
23
|
-
n(/* @__PURE__ */ Error("Could not create blob from canvas"));
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
t(new File([r], e.name.replace(/\.[^.]+$/, `.${i}`), { type: a }));
|
|
27
|
-
}, a, 1);
|
|
28
|
-
}, o.onerror = () => {
|
|
29
|
-
URL.revokeObjectURL(s), n(/* @__PURE__ */ Error("Failed to load image"));
|
|
30
|
-
}, o.src = s;
|
|
31
|
-
});
|
|
32
|
-
}
|
|
33
|
-
function r(e) {
|
|
34
|
-
return new Promise((t, n) => {
|
|
35
|
-
let r = new FileReader();
|
|
36
|
-
r.onload = () => t(r.result), r.onerror = () => n(/* @__PURE__ */ Error("Failed to read file")), r.readAsDataURL(e);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
function i(e, n) {
|
|
40
|
-
if (t(e) && t(n)) {
|
|
41
|
-
let t = { ...e };
|
|
42
|
-
for (let [r, a] of Object.entries(n)) a !== void 0 && (r in e ? t[r] = i(e[r], a) : t[r] = a);
|
|
43
|
-
return t;
|
|
44
|
-
}
|
|
45
|
-
return n;
|
|
46
|
-
}
|
|
47
|
-
//#endregion
|
|
48
|
-
export { i as deepmerge, r as fileToBase64, n as resizeAvatar };
|
package/dist/lib/view-paths.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//#region src/lib/view-paths.ts
|
|
2
|
-
var e = {
|
|
3
|
-
auth: {
|
|
4
|
-
signIn: "sign-in",
|
|
5
|
-
signUp: "sign-up",
|
|
6
|
-
forgotPassword: "forgot-password",
|
|
7
|
-
resetPassword: "reset-password",
|
|
8
|
-
signOut: "sign-out"
|
|
9
|
-
},
|
|
10
|
-
settings: {
|
|
11
|
-
account: "account",
|
|
12
|
-
security: "security"
|
|
13
|
-
}
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { e as viewPaths };
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
//#region src/plugins/api-key/api-key-localization.ts
|
|
2
|
-
var e = {
|
|
3
|
-
apiKey: "API key",
|
|
4
|
-
apiKeys: "API keys",
|
|
5
|
-
apiKeysDescription: "Create an API key for programmatic access to your account.",
|
|
6
|
-
createApiKey: "Create API key",
|
|
7
|
-
noApiKeys: "No API keys",
|
|
8
|
-
name: "Name",
|
|
9
|
-
newApiKey: "New API key",
|
|
10
|
-
newApiKeyWarning: "This is the only time you'll see this API key. Copy and store it somewhere safe.",
|
|
11
|
-
deleteApiKey: "Delete API key",
|
|
12
|
-
deleteApiKeyWarning: "This action cannot be undone. Any service using this API key will stop working immediately.",
|
|
13
|
-
dismissNewKey: "I've saved my key"
|
|
14
|
-
};
|
|
15
|
-
//#endregion
|
|
16
|
-
export { e as apiKeyLocalization };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
|
|
2
|
-
import { apiKeyLocalization as t } from "./api-key-localization.js";
|
|
3
|
-
//#region src/plugins/api-key/api-key-plugin.ts
|
|
4
|
-
var n = e("apiKey", (e = {}) => ({ localization: {
|
|
5
|
-
...t,
|
|
6
|
-
...e.localization
|
|
7
|
-
} }));
|
|
8
|
-
//#endregion
|
|
9
|
-
export { n as apiKeyPlugin };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region src/plugins/delete-user/delete-user-localization.ts
|
|
2
|
-
var e = {
|
|
3
|
-
deleteUser: "Delete user",
|
|
4
|
-
deleteUserDescription: "Permanently remove your account and all associated data. This cannot be undone.",
|
|
5
|
-
deleteUserVerificationSent: "Check your email to confirm account deletion.",
|
|
6
|
-
deleteUserSuccess: "Your account has been deleted."
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as deleteUserLocalization };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
|
|
2
|
-
import { deleteUserLocalization as t } from "./delete-user-localization.js";
|
|
3
|
-
//#region src/plugins/delete-user/delete-user-plugin.ts
|
|
4
|
-
var n = e("deleteUser", (e = {}) => ({
|
|
5
|
-
localization: {
|
|
6
|
-
...t,
|
|
7
|
-
...e.localization
|
|
8
|
-
},
|
|
9
|
-
sendDeleteAccountVerification: e.sendDeleteAccountVerification ?? !1
|
|
10
|
-
}));
|
|
11
|
-
//#endregion
|
|
12
|
-
export { n as deleteUserPlugin };
|
package/dist/plugins/index.d.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from './api-key/api-key-localization';
|
|
2
|
-
export * from './api-key/api-key-mutation-keys';
|
|
3
|
-
export * from './api-key/api-key-plugin';
|
|
4
|
-
export * from './delete-user/delete-user-localization';
|
|
5
|
-
export * from './delete-user/delete-user-plugin';
|
|
6
|
-
export * from './magic-link/magic-link-localization';
|
|
7
|
-
export * from './magic-link/magic-link-mutation-keys';
|
|
8
|
-
export * from './magic-link/magic-link-plugin';
|
|
9
|
-
export * from './multi-session/multi-session-localization';
|
|
10
|
-
export * from './multi-session/multi-session-plugin';
|
|
11
|
-
export * from './passkey/passkey-localization';
|
|
12
|
-
export * from './passkey/passkey-mutation-keys';
|
|
13
|
-
export * from './passkey/passkey-plugin';
|
|
14
|
-
export * from './theme/theme-localization';
|
|
15
|
-
export * from './theme/theme-plugin';
|
|
16
|
-
export * from './username/username-localization';
|
|
17
|
-
export * from './username/username-plugin';
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
|
|
2
|
-
import { magicLinkLocalization as t } from "./magic-link-localization.js";
|
|
3
|
-
//#region src/plugins/magic-link/magic-link-plugin.ts
|
|
4
|
-
var n = e("magicLink", (e = {}) => ({
|
|
5
|
-
localization: {
|
|
6
|
-
...t,
|
|
7
|
-
...e.localization
|
|
8
|
-
},
|
|
9
|
-
viewPaths: { auth: { magicLink: e.path ?? "magic-link" } }
|
|
10
|
-
}));
|
|
11
|
-
//#endregion
|
|
12
|
-
export { n as magicLinkPlugin };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
//#region src/plugins/multi-session/multi-session-localization.ts
|
|
2
|
-
var e = {
|
|
3
|
-
switchAccount: "Switch Account",
|
|
4
|
-
addAccount: "Add Account",
|
|
5
|
-
manageAccounts: "Manage accounts",
|
|
6
|
-
manageAccountsDescription: "Manage your accounts for secure access."
|
|
7
|
-
};
|
|
8
|
-
//#endregion
|
|
9
|
-
export { e as multiSessionLocalization };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
|
|
2
|
-
import { multiSessionLocalization as t } from "./multi-session-localization.js";
|
|
3
|
-
//#region src/plugins/multi-session/multi-session-plugin.ts
|
|
4
|
-
var n = e("multiSession", (e = {}) => ({ localization: {
|
|
5
|
-
...t,
|
|
6
|
-
...e.localization
|
|
7
|
-
} }));
|
|
8
|
-
//#endregion
|
|
9
|
-
export { n as multiSessionPlugin };
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
//#region src/plugins/passkey/passkey-localization.ts
|
|
2
|
-
var e = {
|
|
3
|
-
passkey: "Passkey",
|
|
4
|
-
addPasskey: "Add passkey",
|
|
5
|
-
deletePasskey: "Delete passkey {{name}}",
|
|
6
|
-
deletePasskeyTitle: "Delete passkey",
|
|
7
|
-
deletePasskeyWarning: "This action cannot be undone. You will need to add this passkey again before you can use it to sign in.",
|
|
8
|
-
passkeys: "Passkeys",
|
|
9
|
-
passkeysDescription: "Create a passkey to securely access your account.",
|
|
10
|
-
noPasskeys: "No passkeys",
|
|
11
|
-
name: "Name"
|
|
12
|
-
};
|
|
13
|
-
//#endregion
|
|
14
|
-
export { e as passkeyLocalization };
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
//#region src/plugins/passkey/passkey-mutation-keys.ts
|
|
2
|
-
var e = {
|
|
3
|
-
signIn: [
|
|
4
|
-
"auth",
|
|
5
|
-
"signIn",
|
|
6
|
-
"passkey"
|
|
7
|
-
],
|
|
8
|
-
addPasskey: [
|
|
9
|
-
"auth",
|
|
10
|
-
"passkey",
|
|
11
|
-
"addPasskey"
|
|
12
|
-
],
|
|
13
|
-
deletePasskey: [
|
|
14
|
-
"auth",
|
|
15
|
-
"passkey",
|
|
16
|
-
"deletePasskey"
|
|
17
|
-
]
|
|
18
|
-
};
|
|
19
|
-
//#endregion
|
|
20
|
-
export { e as passkeyMutationKeys };
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
|
|
2
|
-
import { passkeyLocalization as t } from "./passkey-localization.js";
|
|
3
|
-
//#region src/plugins/passkey/passkey-plugin.ts
|
|
4
|
-
var n = e("passkey", (e = {}) => ({ localization: {
|
|
5
|
-
...t,
|
|
6
|
-
...e.localization
|
|
7
|
-
} }));
|
|
8
|
-
//#endregion
|
|
9
|
-
export { n as passkeyPlugin };
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
|
|
2
|
-
import { themeLocalization as t } from "./theme-localization.js";
|
|
3
|
-
//#region src/plugins/theme/theme-plugin.ts
|
|
4
|
-
var n = e("theme", (e) => ({
|
|
5
|
-
localization: {
|
|
6
|
-
...t,
|
|
7
|
-
...e.localization
|
|
8
|
-
},
|
|
9
|
-
theme: e.theme ?? "system",
|
|
10
|
-
setTheme: e.setTheme,
|
|
11
|
-
themes: e.themes ?? [
|
|
12
|
-
"system",
|
|
13
|
-
"light",
|
|
14
|
-
"dark"
|
|
15
|
-
]
|
|
16
|
-
}));
|
|
17
|
-
//#endregion
|
|
18
|
-
export { n as themePlugin };
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
//#region src/plugins/username/username-localization.ts
|
|
2
|
-
var e = {
|
|
3
|
-
username: "Username",
|
|
4
|
-
usernamePlaceholder: "Enter your username",
|
|
5
|
-
usernameOrEmailPlaceholder: "Enter your username or email",
|
|
6
|
-
usernameAvailable: "Username is available",
|
|
7
|
-
usernameTaken: "Username is already taken. Please try another.",
|
|
8
|
-
displayUsername: "Display Username",
|
|
9
|
-
displayUsernamePlaceholder: "Enter your display username"
|
|
10
|
-
};
|
|
11
|
-
//#endregion
|
|
12
|
-
export { e as usernameLocalization };
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { createAuthPlugin as e } from "../../lib/create-auth-plugin.js";
|
|
2
|
-
import { usernameLocalization as t } from "./username-localization.js";
|
|
3
|
-
//#region src/plugins/username/username-plugin.ts
|
|
4
|
-
var n = e("username", (e = {}) => {
|
|
5
|
-
let n = e.minUsernameLength ?? 3, r = e.maxUsernameLength ?? 30, i = {
|
|
6
|
-
...t,
|
|
7
|
-
...e.localization
|
|
8
|
-
};
|
|
9
|
-
return {
|
|
10
|
-
...e,
|
|
11
|
-
minUsernameLength: n,
|
|
12
|
-
maxUsernameLength: r,
|
|
13
|
-
localization: i,
|
|
14
|
-
additionalFields: [{
|
|
15
|
-
name: "username",
|
|
16
|
-
type: "string",
|
|
17
|
-
label: i.username,
|
|
18
|
-
placeholder: i.usernamePlaceholder,
|
|
19
|
-
inputType: "input",
|
|
20
|
-
signUp: "above",
|
|
21
|
-
required: !0
|
|
22
|
-
}, ...e.displayUsername ? [{
|
|
23
|
-
name: "displayUsername",
|
|
24
|
-
type: "string",
|
|
25
|
-
label: i.displayUsername,
|
|
26
|
-
placeholder: i.displayUsernamePlaceholder,
|
|
27
|
-
inputType: "input",
|
|
28
|
-
signUp: "above"
|
|
29
|
-
}] : []]
|
|
30
|
-
};
|
|
31
|
-
});
|
|
32
|
-
//#endregion
|
|
33
|
-
export { n as usernamePlugin };
|
package/src/plugins/index.ts
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
export * from "./api-key/api-key-localization"
|
|
2
|
-
export * from "./api-key/api-key-mutation-keys"
|
|
3
|
-
export * from "./api-key/api-key-plugin"
|
|
4
|
-
export * from "./delete-user/delete-user-localization"
|
|
5
|
-
export * from "./delete-user/delete-user-plugin"
|
|
6
|
-
export * from "./magic-link/magic-link-localization"
|
|
7
|
-
export * from "./magic-link/magic-link-mutation-keys"
|
|
8
|
-
export * from "./magic-link/magic-link-plugin"
|
|
9
|
-
export * from "./multi-session/multi-session-localization"
|
|
10
|
-
export * from "./multi-session/multi-session-plugin"
|
|
11
|
-
export * from "./passkey/passkey-localization"
|
|
12
|
-
export * from "./passkey/passkey-mutation-keys"
|
|
13
|
-
export * from "./passkey/passkey-plugin"
|
|
14
|
-
export * from "./theme/theme-localization"
|
|
15
|
-
export * from "./theme/theme-plugin"
|
|
16
|
-
export * from "./username/username-localization"
|
|
17
|
-
export * from "./username/username-plugin"
|