@better-auth-ui/core 1.6.0 → 1.6.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.
Files changed (83) hide show
  1. package/dist/config/auth-config.d.ts +18 -10
  2. package/dist/config/auth-config.js +41 -34
  3. package/dist/config/index.d.ts +6 -5
  4. package/dist/config/username-config.d.ts +18 -0
  5. package/dist/index.d.ts +6 -6
  6. package/dist/index.js +7 -6
  7. package/dist/lib/base-paths.js +7 -4
  8. package/dist/lib/localization.d.ts +22 -0
  9. package/dist/lib/localization.js +102 -171
  10. package/dist/lib/provider-names.d.ts +1 -1
  11. package/dist/lib/provider-names.js +41 -48
  12. package/dist/lib/utils.js +43 -111
  13. package/dist/lib/view-paths.js +16 -13
  14. package/package.json +11 -6
  15. package/src/config/auth-config.ts +17 -2
  16. package/src/config/index.ts +1 -0
  17. package/src/config/username-config.ts +18 -0
  18. package/src/lib/localization.ts +33 -0
  19. package/dist/base-paths.d.ts +0 -21
  20. package/dist/base-paths.js +0 -5
  21. package/dist/config/appearance-config.js +0 -1
  22. package/dist/config/avatar-config.js +0 -1
  23. package/dist/config/delete-user-config.js +0 -1
  24. package/dist/config/email-and-password-config.js +0 -1
  25. package/dist/config/index.js +0 -5
  26. package/dist/config/settings-config.d.ts +0 -17
  27. package/dist/config/settings-config.js +0 -1
  28. package/dist/config/toast-config.d.ts +0 -58
  29. package/dist/config/toast-config.js +0 -16
  30. package/dist/lib/auth-callback-options.d.ts +0 -8
  31. package/dist/lib/auth-callback-options.js +0 -1
  32. package/dist/lib/auth-config.d.ts +0 -198
  33. package/dist/lib/auth-config.js +0 -36
  34. package/dist/lib/auth-error.d.ts +0 -9
  35. package/dist/lib/auth-error.js +0 -1
  36. package/dist/lib/auth-hook-options.d.ts +0 -8
  37. package/dist/lib/auth-hook-options.js +0 -1
  38. package/dist/lib/auth-toast.d.ts +0 -24
  39. package/dist/lib/auth-toast.js +0 -10
  40. package/dist/lib/config/appearance-config.d.ts +0 -23
  41. package/dist/lib/config/appearance-config.js +0 -1
  42. package/dist/lib/config/auth-config.d.ts +0 -70
  43. package/dist/lib/config/auth-config.js +0 -36
  44. package/dist/lib/config/avatar-config.d.ts +0 -35
  45. package/dist/lib/config/avatar-config.js +0 -1
  46. package/dist/lib/config/email-and-password-config.d.ts +0 -37
  47. package/dist/lib/config/email-and-password-config.js +0 -1
  48. package/dist/lib/config/index.d.ts +0 -6
  49. package/dist/lib/config/index.js +0 -6
  50. package/dist/lib/config/settings-config.d.ts +0 -22
  51. package/dist/lib/config/settings-config.js +0 -1
  52. package/dist/lib/config/toast-config.d.ts +0 -24
  53. package/dist/lib/config/toast-config.js +0 -10
  54. package/dist/lib/toast-config.d.ts +0 -24
  55. package/dist/lib/toast-config.js +0 -10
  56. package/dist/localization/index.d.ts +0 -35
  57. package/dist/localization/index.js +0 -34
  58. package/dist/localization/localization.d.ts +0 -35
  59. package/dist/localization/localization.js +0 -34
  60. package/dist/localization.d.ts +0 -159
  61. package/dist/localization.js +0 -156
  62. package/dist/provider-names.d.ts +0 -12
  63. package/dist/provider-names.js +0 -50
  64. package/dist/src/index.d.ts +0 -7
  65. package/dist/src/index.js +0 -7
  66. package/dist/src/lib/auth-config.d.ts +0 -148
  67. package/dist/src/lib/auth-config.js +0 -28
  68. package/dist/src/lib/auth-toast.d.ts +0 -24
  69. package/dist/src/lib/auth-toast.js +0 -10
  70. package/dist/src/lib/base-paths.d.ts +0 -9
  71. package/dist/src/lib/base-paths.js +0 -9
  72. package/dist/src/lib/localization.d.ts +0 -145
  73. package/dist/src/lib/localization.js +0 -142
  74. package/dist/src/lib/provider-names.d.ts +0 -12
  75. package/dist/src/lib/provider-names.js +0 -49
  76. package/dist/src/lib/utils.d.ts +0 -1
  77. package/dist/src/lib/utils.js +0 -30
  78. package/dist/src/lib/view-paths.d.ts +0 -30
  79. package/dist/src/lib/view-paths.js +0 -17
  80. package/dist/utils.d.ts +0 -3
  81. package/dist/utils.js +0 -80
  82. package/dist/view-paths.d.ts +0 -30
  83. package/dist/view-paths.js +0 -17
@@ -1,11 +1,12 @@
1
- import type { SocialProvider } from "better-auth/social-providers";
2
- import { type BasePaths } from "../lib/base-paths";
3
- import { type Localization } from "../lib/localization";
4
- import { type ViewPaths } from "../lib/view-paths";
5
- import type { AppearanceConfig } from "./appearance-config";
6
- import type { AvatarConfig } from "./avatar-config";
7
- import type { DeleteUserConfig } from "./delete-user-config";
8
- import type { EmailAndPasswordConfig } from "./email-and-password-config";
1
+ import { SocialProvider } from 'better-auth/social-providers';
2
+ import { BasePaths } from '../lib/base-paths';
3
+ import { Localization } from '../lib/localization';
4
+ import { ViewPaths } from '../lib/view-paths';
5
+ import { AppearanceConfig } from './appearance-config';
6
+ import { AvatarConfig } from './avatar-config';
7
+ import { DeleteUserConfig } from './delete-user-config';
8
+ import { EmailAndPasswordConfig } from './email-and-password-config';
9
+ import { UsernameConfig } from './username-config';
9
10
  /**
10
11
  * Core authentication configuration interface.
11
12
  *
@@ -50,10 +51,12 @@ export interface AuthConfig {
50
51
  * @remarks `Localization`
51
52
  */
52
53
  localization: Localization;
53
- /** Whether magic link (passwordless) authentication is enabled */
54
+ /** Whether Magic Link plugin is enabled */
54
55
  magicLink?: boolean;
55
- /** Whether multi-session support is enabled */
56
+ /** Whether Multi Session plugin is enabled */
56
57
  multiSession?: boolean;
58
+ /** Whether Passkey plugin is enabled */
59
+ passkey?: boolean;
57
60
  /**
58
61
  * Default redirect path after successful authentication
59
62
  * @default "/"
@@ -69,6 +72,11 @@ export interface AuthConfig {
69
72
  * @remarks `ViewPaths`
70
73
  */
71
74
  viewPaths: ViewPaths;
75
+ /**
76
+ * Username plugin configuration
77
+ * @remarks `UsernameConfig`
78
+ */
79
+ username: UsernameConfig;
72
80
  /**
73
81
  * Function to navigate to a new path
74
82
  * @param options - Navigation options with href and optional replace flag
@@ -1,35 +1,42 @@
1
- import { basePaths } from "../lib/base-paths";
2
- import { localization } from "../lib/localization";
3
- import { resizeAvatar } from "../lib/utils";
4
- import { viewPaths } from "../lib/view-paths";
5
- export const defaultAuthConfig = {
6
- appearance: {
7
- themes: ["system", "light", "dark"]
8
- },
9
- avatar: {
10
- enabled: true,
11
- resize: resizeAvatar,
12
- size: 256,
13
- extension: "png"
14
- },
15
- basePaths,
16
- baseURL: "",
17
- emailAndPassword: {
18
- enabled: true,
19
- forgotPassword: true,
20
- rememberMe: false,
21
- minPasswordLength: 8,
22
- maxPasswordLength: 128
23
- },
24
- redirectTo: "/",
25
- viewPaths,
26
- localization,
27
- navigate: ({ to, replace }) => {
28
- if (replace) {
29
- window.location.replace(to);
30
- }
31
- else {
32
- window.location.href = to;
33
- }
34
- }
1
+ import { basePaths as e } from "../lib/base-paths.js";
2
+ import { localization as t } from "../lib/localization.js";
3
+ import { resizeAvatar as n } from "../lib/utils.js";
4
+ import { viewPaths as r } from "../lib/view-paths.js";
5
+ //#region src/config/auth-config.ts
6
+ var i = {
7
+ appearance: { themes: [
8
+ "system",
9
+ "light",
10
+ "dark"
11
+ ] },
12
+ avatar: {
13
+ enabled: !0,
14
+ resize: n,
15
+ size: 256,
16
+ extension: "png"
17
+ },
18
+ basePaths: e,
19
+ baseURL: "",
20
+ emailAndPassword: {
21
+ enabled: !0,
22
+ forgotPassword: !0,
23
+ rememberMe: !1,
24
+ minPasswordLength: 8,
25
+ maxPasswordLength: 128
26
+ },
27
+ redirectTo: "/",
28
+ viewPaths: r,
29
+ localization: t,
30
+ username: {
31
+ enabled: !1,
32
+ displayUsername: !0,
33
+ isUsernameAvailable: !0,
34
+ minUsernameLength: 3,
35
+ maxUsernameLength: 30
36
+ },
37
+ navigate: ({ to: e, replace: t }) => {
38
+ t ? window.location.replace(e) : window.location.href = e;
39
+ }
35
40
  };
41
+ //#endregion
42
+ export { i as defaultAuthConfig };
@@ -1,5 +1,6 @@
1
- export * from "./appearance-config";
2
- export * from "./auth-config";
3
- export * from "./avatar-config";
4
- export * from "./delete-user-config";
5
- export * from "./email-and-password-config";
1
+ export * from './appearance-config';
2
+ export * from './auth-config';
3
+ export * from './avatar-config';
4
+ export * from './delete-user-config';
5
+ export * from './email-and-password-config';
6
+ export * from './username-config';
@@ -0,0 +1,18 @@
1
+ export interface UsernameConfig {
2
+ /** Whether the username plugin is enabled */
3
+ enabled: boolean;
4
+ /** Whether to use displayUsername for the visible username field */
5
+ displayUsername: boolean;
6
+ /** Whether to check username availability on sign-up and user profile */
7
+ isUsernameAvailable: boolean;
8
+ /**
9
+ * Minimum allowed username length
10
+ * @default 3
11
+ */
12
+ minUsernameLength: number;
13
+ /**
14
+ * Maximum allowed username length
15
+ * @default 30
16
+ */
17
+ maxUsernameLength: number;
18
+ }
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export * from "./config";
2
- export * from "./lib/base-paths";
3
- export * from "./lib/localization";
4
- export * from "./lib/provider-names";
5
- export * from "./lib/utils";
6
- export * from "./lib/view-paths";
1
+ export * from './config';
2
+ export * from './lib/base-paths';
3
+ export * from './lib/localization';
4
+ export * from './lib/provider-names';
5
+ export * from './lib/utils';
6
+ export * from './lib/view-paths';
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
- export * from "./config";
2
- export * from "./lib/base-paths";
3
- export * from "./lib/localization";
4
- export * from "./lib/provider-names";
5
- export * from "./lib/utils";
6
- export * from "./lib/view-paths";
1
+ import { basePaths as e } from "./lib/base-paths.js";
2
+ import { localization as t } from "./lib/localization.js";
3
+ import { deepmerge as n, fileToBase64 as r, resizeAvatar as i } from "./lib/utils.js";
4
+ import { viewPaths as a } from "./lib/view-paths.js";
5
+ import { defaultAuthConfig as o } from "./config/auth-config.js";
6
+ import { getProviderName as s, providerNames as c } from "./lib/provider-names.js";
7
+ export { e as basePaths, n as deepmerge, o as defaultAuthConfig, r as fileToBase64, s as getProviderName, t as localization, c as providerNames, i as resizeAvatar, a as viewPaths };
@@ -1,5 +1,8 @@
1
- export const basePaths = {
2
- auth: "/auth",
3
- settings: "/settings",
4
- organization: "/organization"
1
+ //#region src/lib/base-paths.ts
2
+ var e = {
3
+ auth: "/auth",
4
+ settings: "/settings",
5
+ organization: "/organization"
5
6
  };
7
+ //#endregion
8
+ export { e as basePaths };
@@ -40,6 +40,8 @@ export declare const localization: {
40
40
  newPasswordPlaceholder: string;
41
41
  /** @remarks `"OR"` */
42
42
  or: string;
43
+ /** @remarks `"Passkey"` */
44
+ passkey: string;
43
45
  /** @remarks `"Password"` */
44
46
  password: string;
45
47
  /** @remarks `"Enter your password"` */
@@ -72,6 +74,16 @@ export declare const localization: {
72
74
  signUp: string;
73
75
  /** @remarks `"Switch Account"` */
74
76
  switchAccount: string;
77
+ /** @remarks `"Username"` */
78
+ username: string;
79
+ /** @remarks `"Username is available"` */
80
+ usernameAvailable: string;
81
+ /** @remarks `"Enter your username or email"` */
82
+ usernameOrEmailPlaceholder: string;
83
+ /** @remarks `"Enter your username"` */
84
+ usernamePlaceholder: string;
85
+ /** @remarks `"Username is already taken. Please try another."` */
86
+ usernameTaken: string;
75
87
  /** @remarks `"Verification email sent!"` */
76
88
  verificationEmailSent: string;
77
89
  /** @remarks `"Verify your email"` */
@@ -136,6 +148,16 @@ export declare const localization: {
136
148
  light: string;
137
149
  /** @remarks `"Manage accounts"` */
138
150
  manageAccounts: string;
151
+ /** @remarks `"Add passkey"` */
152
+ addPasskey: string;
153
+ /** @remarks `"Delete"` */
154
+ delete: string;
155
+ /** @remarks `"Passkeys"` */
156
+ passkeys: string;
157
+ /** @remarks `"Manage your passkeys for secure access."` */
158
+ passkeysDescription: string;
159
+ /** @remarks `"Securely access your account without a password."` */
160
+ passkeysInstructions: string;
139
161
  /** @remarks `"Profile"` */
140
162
  profile: string;
141
163
  /** @remarks `"Profile updated successfully"` */
@@ -1,172 +1,103 @@
1
- export const localization = {
2
- auth: {
3
- /** @remarks `"Account"` */
4
- account: "Account",
5
- /** @remarks `"Add Account"` */
6
- addAccount: "Add Account",
7
- /** @remarks `"Already have an account?"` */
8
- alreadyHaveAnAccount: "Already have an account?",
9
- /** @remarks `"Confirm password"` */
10
- confirmPassword: "Confirm password",
11
- /** @remarks `"Confirm your password"` */
12
- confirmPasswordPlaceholder: "Confirm your password",
13
- /** @remarks `"Continue with {{provider}}"` */
14
- continueWith: "Continue with {{provider}}",
15
- /** @remarks `"Email"` */
16
- email: "Email",
17
- /** @remarks `"Enter your email"` */
18
- emailPlaceholder: "Enter your email",
19
- /** @remarks `"Forgot Password"` */
20
- forgotPassword: "Forgot Password",
21
- /** @remarks `"Forgot password?"` */
22
- forgotPasswordLink: "Forgot password?",
23
- /** @remarks `"Hide password"` */
24
- hidePassword: "Hide password",
25
- /** @remarks `"Invalid reset password token"` */
26
- invalidResetPasswordToken: "Invalid reset password token",
27
- /** @remarks `"Magic Link"` */
28
- magicLink: "Magic Link",
29
- /** @remarks `"Magic link sent to your email"` */
30
- magicLinkSent: "Magic link sent to your email",
31
- /** @remarks `"Name"` */
32
- name: "Name",
33
- /** @remarks `"Enter your name"` */
34
- namePlaceholder: "Enter your name",
35
- /** @remarks `"Need to create an account?"` */
36
- needToCreateAnAccount: "Need to create an account?",
37
- /** @remarks `"New password"` */
38
- newPassword: "New password",
39
- /** @remarks `"Enter your new password"` */
40
- newPasswordPlaceholder: "Enter your new password",
41
- /** @remarks `"OR"` */
42
- or: "OR",
43
- /** @remarks `"Password"` */
44
- password: "Password",
45
- /** @remarks `"Enter your password"` */
46
- passwordPlaceholder: "Enter your password",
47
- /** @remarks `"Password reset email sent"` */
48
- passwordResetEmailSent: "Password reset email sent",
49
- /** @remarks `"Password reset successfully"` */
50
- passwordResetSuccess: "Password reset successfully",
51
- /** @remarks `"Passwords do not match"` */
52
- passwordsDoNotMatch: "Passwords do not match",
53
- /** @remarks `"Remember me"` */
54
- rememberMe: "Remember me",
55
- /** @remarks `"Remember your password?"` */
56
- rememberYourPassword: "Remember your password?",
57
- /** @remarks `"Resend"` */
58
- resend: "Resend",
59
- /** @remarks `"Reset Password"` */
60
- resetPassword: "Reset Password",
61
- /** @remarks `"Send Magic Link"` */
62
- sendMagicLink: "Send Magic Link",
63
- /** @remarks `"Send reset link"` */
64
- sendResetLink: "Send reset link",
65
- /** @remarks `"Show password"` */
66
- showPassword: "Show password",
67
- /** @remarks `"Sign In"` */
68
- signIn: "Sign In",
69
- /** @remarks `"Sign Out"` */
70
- signOut: "Sign Out",
71
- /** @remarks `"Sign Up"` */
72
- signUp: "Sign Up",
73
- /** @remarks `"Switch Account"` */
74
- switchAccount: "Switch Account",
75
- /** @remarks `"Verification email sent!"` */
76
- verificationEmailSent: "Verification email sent!",
77
- /** @remarks `"Verify your email"` */
78
- verifyYourEmail: "Verify your email"
79
- },
80
- settings: {
81
- /** @remarks `"Account"` */
82
- account: "Account",
83
- /** @remarks `"Account unlinked"` */
84
- accountUnlinked: "Account unlinked",
85
- /** @remarks `"Active"` */
86
- active: "Active",
87
- /** @remarks `"Active sessions"` */
88
- activeSessions: "Active sessions",
89
- /** @remarks `"Avatar"` */
90
- avatar: "Avatar",
91
- /** @remarks `"Current session"` */
92
- currentSession: "Current session",
93
- /** @remarks `"Avatar changed successfully"` */
94
- avatarChangedSuccess: "Avatar changed successfully",
95
- /** @remarks `"Avatar deleted successfully"` */
96
- avatarDeletedSuccess: "Avatar deleted successfully",
97
- /** @remarks `"Change avatar"` */
98
- changeAvatar: "Change avatar",
99
- /** @remarks `"Delete avatar"` */
100
- deleteAvatar: "Delete avatar",
101
- /** @remarks `"Link"` */
102
- link: "Link",
103
- /** @remarks `"Linked accounts"` */
104
- linkedAccounts: "Linked accounts",
105
- /** @remarks `"Link your {{provider}} account"` */
106
- linkProvider: "Link your {{provider}} account",
107
- /** @remarks `"Appearance"` */
108
- appearance: "Appearance",
109
- /** @remarks `"Cancel"` */
110
- cancel: "Cancel",
111
- /** @remarks `"Change email"` */
112
- changeEmail: "Change email",
113
- /** @remarks `"Check your email to confirm the change"` */
114
- changeEmailSuccess: "Check your email to confirm the change",
115
- /** @remarks `"Change password"` */
116
- changePassword: "Change password",
117
- /** @remarks `"Password changed successfully"` */
118
- changePasswordSuccess: "Password changed successfully",
119
- /** @remarks `"Current password"` */
120
- currentPassword: "Current password",
121
- /** @remarks `"Enter your current password"` */
122
- currentPasswordPlaceholder: "Enter your current password",
123
- /** @remarks `"Dark"` */
124
- dark: "Dark",
125
- /** @remarks `"Danger zone"` */
126
- dangerZone: "Danger zone",
127
- /** @remarks `"Delete user"` */
128
- deleteUser: "Delete user",
129
- /** @remarks `"Permanently remove your account and all associated data. This cannot be undone."` */
130
- deleteUserDescription: "Permanently remove your account and all associated data. This cannot be undone.",
131
- /** @remarks `"Check your email to confirm account deletion."` */
132
- deleteUserVerificationSent: "Check your email to confirm account deletion.",
133
- /** @remarks `"Your account has been deleted."` */
134
- deleteUserSuccess: "Your account has been deleted.",
135
- /** @remarks `"Light"` */
136
- light: "Light",
137
- /** @remarks `"Manage accounts"` */
138
- manageAccounts: "Manage accounts",
139
- /** @remarks `"Profile"` */
140
- profile: "Profile",
141
- /** @remarks `"Profile updated successfully"` */
142
- profileUpdatedSuccess: "Profile updated successfully",
143
- /** @remarks `"Revoke"` */
144
- revoke: "Revoke",
145
- /** @remarks `"Revoke session"` */
146
- revokeSession: "Revoke session",
147
- /** @remarks `"Session revoked successfully"` */
148
- revokeSessionSuccess: "Session revoked successfully",
149
- /** @remarks `"Save changes"` */
150
- saveChanges: "Save changes",
151
- /** @remarks `"Set password"` */
152
- setPassword: "Set password",
153
- /** @remarks `"You don't have a password yet. Request a reset link to set one up."` */
154
- setPasswordDescription: "You don't have a password yet. Request a reset link to set one up.",
155
- /** @remarks `"Security"` */
156
- security: "Security",
157
- /** @remarks `"Settings"` */
158
- settings: "Settings",
159
- /** @remarks `"System"` */
160
- system: "System",
161
- /** @remarks `"Theme"` */
162
- theme: "Theme",
163
- /** @remarks `"Unlink {{provider}}"` */
164
- unlinkProvider: "Unlink {{provider}}",
165
- /** @remarks `"Update email"` */
166
- updateEmail: "Update email",
167
- /** @remarks `"Update password"` */
168
- updatePassword: "Update password",
169
- /** @remarks `"Upload avatar"` */
170
- uploadAvatar: "Upload avatar"
171
- }
1
+ //#region src/lib/localization.ts
2
+ var e = {
3
+ auth: {
4
+ account: "Account",
5
+ addAccount: "Add Account",
6
+ alreadyHaveAnAccount: "Already have an account?",
7
+ confirmPassword: "Confirm password",
8
+ confirmPasswordPlaceholder: "Confirm your password",
9
+ continueWith: "Continue with {{provider}}",
10
+ email: "Email",
11
+ emailPlaceholder: "Enter your email",
12
+ forgotPassword: "Forgot Password",
13
+ forgotPasswordLink: "Forgot password?",
14
+ hidePassword: "Hide password",
15
+ invalidResetPasswordToken: "Invalid reset password token",
16
+ magicLink: "Magic Link",
17
+ magicLinkSent: "Magic link sent to your email",
18
+ name: "Name",
19
+ namePlaceholder: "Enter your name",
20
+ needToCreateAnAccount: "Need to create an account?",
21
+ newPassword: "New password",
22
+ newPasswordPlaceholder: "Enter your new password",
23
+ or: "OR",
24
+ passkey: "Passkey",
25
+ password: "Password",
26
+ passwordPlaceholder: "Enter your password",
27
+ passwordResetEmailSent: "Password reset email sent",
28
+ passwordResetSuccess: "Password reset successfully",
29
+ passwordsDoNotMatch: "Passwords do not match",
30
+ rememberMe: "Remember me",
31
+ rememberYourPassword: "Remember your password?",
32
+ resend: "Resend",
33
+ resetPassword: "Reset Password",
34
+ sendMagicLink: "Send Magic Link",
35
+ sendResetLink: "Send reset link",
36
+ showPassword: "Show password",
37
+ signIn: "Sign In",
38
+ signOut: "Sign Out",
39
+ signUp: "Sign Up",
40
+ switchAccount: "Switch Account",
41
+ username: "Username",
42
+ usernameAvailable: "Username is available",
43
+ usernameOrEmailPlaceholder: "Enter your username or email",
44
+ usernamePlaceholder: "Enter your username",
45
+ usernameTaken: "Username is already taken. Please try another.",
46
+ verificationEmailSent: "Verification email sent!",
47
+ verifyYourEmail: "Verify your email"
48
+ },
49
+ settings: {
50
+ account: "Account",
51
+ accountUnlinked: "Account unlinked",
52
+ active: "Active",
53
+ activeSessions: "Active sessions",
54
+ avatar: "Avatar",
55
+ currentSession: "Current session",
56
+ avatarChangedSuccess: "Avatar changed successfully",
57
+ avatarDeletedSuccess: "Avatar deleted successfully",
58
+ changeAvatar: "Change avatar",
59
+ deleteAvatar: "Delete avatar",
60
+ link: "Link",
61
+ linkedAccounts: "Linked accounts",
62
+ linkProvider: "Link your {{provider}} account",
63
+ appearance: "Appearance",
64
+ cancel: "Cancel",
65
+ changeEmail: "Change email",
66
+ changeEmailSuccess: "Check your email to confirm the change",
67
+ changePassword: "Change password",
68
+ changePasswordSuccess: "Password changed successfully",
69
+ currentPassword: "Current password",
70
+ currentPasswordPlaceholder: "Enter your current password",
71
+ dark: "Dark",
72
+ dangerZone: "Danger zone",
73
+ deleteUser: "Delete user",
74
+ deleteUserDescription: "Permanently remove your account and all associated data. This cannot be undone.",
75
+ deleteUserVerificationSent: "Check your email to confirm account deletion.",
76
+ deleteUserSuccess: "Your account has been deleted.",
77
+ light: "Light",
78
+ manageAccounts: "Manage accounts",
79
+ addPasskey: "Add passkey",
80
+ delete: "Delete",
81
+ passkeys: "Passkeys",
82
+ passkeysDescription: "Manage your passkeys for secure access.",
83
+ passkeysInstructions: "Securely access your account without a password.",
84
+ profile: "Profile",
85
+ profileUpdatedSuccess: "Profile updated successfully",
86
+ revoke: "Revoke",
87
+ revokeSession: "Revoke session",
88
+ revokeSessionSuccess: "Session revoked successfully",
89
+ saveChanges: "Save changes",
90
+ setPassword: "Set password",
91
+ setPasswordDescription: "You don't have a password yet. Request a reset link to set one up.",
92
+ security: "Security",
93
+ settings: "Settings",
94
+ system: "System",
95
+ theme: "Theme",
96
+ unlinkProvider: "Unlink {{provider}}",
97
+ updateEmail: "Update email",
98
+ updatePassword: "Update password",
99
+ uploadAvatar: "Upload avatar"
100
+ }
172
101
  };
102
+ //#endregion
103
+ export { e as localization };
@@ -1,4 +1,4 @@
1
- import type { SocialProvider } from "better-auth/social-providers";
1
+ import { SocialProvider } from 'better-auth/social-providers';
2
2
  /**
3
3
  * Mapping of social authentication provider identifiers to their human-readable display names.
4
4
  */
@@ -1,50 +1,43 @@
1
- /**
2
- * Mapping of social authentication provider identifiers to their human-readable display names.
3
- */
4
- export const providerNames = {
5
- apple: "Apple",
6
- atlassian: "Atlassian",
7
- cognito: "Cognito",
8
- discord: "Discord",
9
- dropbox: "Dropbox",
10
- facebook: "Facebook",
11
- figma: "Figma",
12
- github: "GitHub",
13
- gitlab: "GitLab",
14
- google: "Google",
15
- huggingface: "Hugging Face",
16
- kakao: "Kakao",
17
- kick: "Kick",
18
- line: "LINE",
19
- linear: "Linear",
20
- linkedin: "LinkedIn",
21
- microsoft: "Microsoft",
22
- naver: "Naver",
23
- notion: "Notion",
24
- paybin: "Paybin",
25
- paypal: "PayPal",
26
- polar: "Polar",
27
- railway: "Railway",
28
- reddit: "Reddit",
29
- roblox: "Roblox",
30
- salesforce: "Salesforce",
31
- slack: "Slack",
32
- spotify: "Spotify",
33
- tiktok: "TikTok",
34
- twitch: "Twitch",
35
- twitter: "X",
36
- vercel: "Vercel",
37
- vk: "VK",
38
- wechat: "WeChat",
39
- zoom: "Zoom"
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"
40
38
  };
41
- /**
42
- * Get the human-readable display name for an authentication provider.
43
- *
44
- * @param provider - The provider identifier (e.g., "github", "google").
45
- * @returns The mapped display name for `provider` if available, otherwise `provider` with its first character capitalized.
46
- */
47
- export function getProviderName(provider) {
48
- return (providerNames[provider] ||
49
- provider.charAt(0).toUpperCase() + provider.slice(1));
39
+ function t(t) {
40
+ return e[t] || t.charAt(0).toUpperCase() + t.slice(1);
50
41
  }
42
+ //#endregion
43
+ export { t as getProviderName, e as providerNames };