hazo_auth 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 (74) hide show
  1. package/README.md +191 -19
  2. package/SETUP_CHECKLIST.md +190 -65
  3. package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.d.ts +9 -0
  4. package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.d.ts.map +1 -0
  5. package/dist/app/api/hazo_auth/library_photo/[category]/[filename]/route.js +82 -0
  6. package/dist/app/api/hazo_auth/library_photos/route.d.ts +9 -0
  7. package/dist/app/api/hazo_auth/library_photos/route.d.ts.map +1 -1
  8. package/dist/app/api/hazo_auth/library_photos/route.js +31 -6
  9. package/dist/cli/generate.d.ts +6 -1
  10. package/dist/cli/generate.d.ts.map +1 -1
  11. package/dist/cli/generate.js +101 -34
  12. package/dist/cli/index.js +64 -11
  13. package/dist/cli/init.d.ts +2 -0
  14. package/dist/cli/init.d.ts.map +1 -0
  15. package/dist/cli/init.js +206 -0
  16. package/dist/client.d.ts +8 -0
  17. package/dist/client.d.ts.map +1 -0
  18. package/dist/client.js +25 -0
  19. package/dist/components/layouts/email_verification/index.d.ts +2 -1
  20. package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
  21. package/dist/components/layouts/email_verification/index.js +3 -2
  22. package/dist/components/layouts/forgot_password/index.d.ts +3 -1
  23. package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
  24. package/dist/components/layouts/forgot_password/index.js +3 -2
  25. package/dist/components/layouts/my_settings/components/editable_field.js +1 -1
  26. package/dist/components/layouts/my_settings/components/password_change_dialog.js +1 -1
  27. package/dist/components/layouts/my_settings/components/profile_picture_display.js +1 -1
  28. package/dist/components/layouts/my_settings/components/profile_picture_gravatar_tab.js +1 -1
  29. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +4 -4
  30. package/dist/components/layouts/my_settings/components/profile_picture_upload_tab.js +4 -4
  31. package/dist/components/layouts/my_settings/index.js +1 -1
  32. package/dist/components/layouts/shared/components/profile_pic_menu.js +2 -2
  33. package/dist/lib/auth_utility_config.server.js +2 -2
  34. package/dist/lib/services/profile_picture_service.d.ts +34 -2
  35. package/dist/lib/services/profile_picture_service.d.ts.map +1 -1
  36. package/dist/lib/services/profile_picture_service.js +157 -15
  37. package/dist/lib/services/user_profiles_cache.d.ts +76 -0
  38. package/dist/lib/services/user_profiles_cache.d.ts.map +1 -0
  39. package/dist/lib/services/user_profiles_cache.js +141 -0
  40. package/dist/lib/services/user_profiles_service.d.ts +17 -0
  41. package/dist/lib/services/user_profiles_service.d.ts.map +1 -1
  42. package/dist/lib/services/user_profiles_service.js +136 -44
  43. package/dist/lib/user_profiles_config.server.d.ts +15 -0
  44. package/dist/lib/user_profiles_config.server.d.ts.map +1 -0
  45. package/dist/lib/user_profiles_config.server.js +23 -0
  46. package/dist/page_components/forgot_password.d.ts +19 -0
  47. package/dist/page_components/forgot_password.d.ts.map +1 -0
  48. package/dist/page_components/forgot_password.js +36 -0
  49. package/dist/page_components/index.d.ts +7 -0
  50. package/dist/page_components/index.d.ts.map +1 -0
  51. package/dist/page_components/index.js +9 -0
  52. package/dist/page_components/login.d.ts +26 -0
  53. package/dist/page_components/login.d.ts.map +1 -0
  54. package/dist/page_components/login.js +40 -0
  55. package/dist/page_components/my_settings.d.ts +64 -0
  56. package/dist/page_components/my_settings.d.ts.map +1 -0
  57. package/dist/page_components/my_settings.js +67 -0
  58. package/dist/page_components/register.d.ts +25 -0
  59. package/dist/page_components/register.d.ts.map +1 -0
  60. package/dist/page_components/register.js +43 -0
  61. package/dist/page_components/reset_password.d.ts +25 -0
  62. package/dist/page_components/reset_password.d.ts.map +1 -0
  63. package/dist/page_components/reset_password.js +43 -0
  64. package/dist/page_components/verify_email.d.ts +21 -0
  65. package/dist/page_components/verify_email.d.ts.map +1 -0
  66. package/dist/page_components/verify_email.js +36 -0
  67. package/dist/server/routes/index.d.ts +1 -0
  68. package/dist/server/routes/index.d.ts.map +1 -1
  69. package/dist/server/routes/index.js +1 -0
  70. package/dist/server/routes/library_photo.d.ts +2 -0
  71. package/dist/server/routes/library_photo.d.ts.map +1 -0
  72. package/dist/server/routes/library_photo.js +3 -0
  73. package/hazo_auth_config.example.ini +25 -5
  74. package/package.json +33 -1
@@ -0,0 +1,25 @@
1
+ import type { PasswordRequirementOverrides } from "../components/layouts/shared/config/layout_customization";
2
+ export type ResetPasswordPageProps = {
3
+ errorMessage?: string;
4
+ successMessage?: string;
5
+ loginPath?: string;
6
+ forgotPasswordPath?: string;
7
+ passwordRequirements?: PasswordRequirementOverrides;
8
+ alreadyLoggedInMessage?: string;
9
+ showLogoutButton?: boolean;
10
+ showReturnHomeButton?: boolean;
11
+ returnHomeButtonLabel?: string;
12
+ returnHomePath?: string;
13
+ imageSrc?: string;
14
+ imageAlt?: string;
15
+ imageBackgroundColor?: string;
16
+ };
17
+ /**
18
+ * Zero-config reset password page component
19
+ * Uses sensible defaults and can be customized via props
20
+ * @param props - Optional configuration overrides
21
+ * @returns Reset password page component
22
+ */
23
+ export declare function ResetPasswordPage({ errorMessage, successMessage, loginPath, forgotPasswordPath, passwordRequirements, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, imageSrc, imageAlt, imageBackgroundColor, }?: ResetPasswordPageProps): import("react/jsx-runtime").JSX.Element;
24
+ export default ResetPasswordPage;
25
+ //# sourceMappingURL=reset_password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"reset_password.d.ts","sourceRoot":"","sources":["../../src/page_components/reset_password.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AAgB7G,MAAM,MAAM,sBAAsB,GAAG;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,oBAAoB,CAAC,EAAE,4BAA4B,CAAC;IACpD,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,YAAmE,EACnE,cAAwF,EACxF,SAA8B,EAC9B,kBAAiD,EACjD,oBAAoD,EACpD,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,sBAA2B,2CAsC7B;AAED,eAAe,iBAAiB,CAAC"}
@@ -0,0 +1,43 @@
1
+ // file_description: zero-config reset password page component for hazo_auth
2
+ // Consumers can use this directly without needing to configure props
3
+ "use client";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ // section: imports
6
+ import { useEffect, useState } from "react";
7
+ import reset_password_layout from "../components/layouts/reset_password";
8
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
9
+ import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup";
10
+ // section: constants
11
+ const DEFAULT_IMAGE_SRC = "/globe.svg";
12
+ const DEFAULT_IMAGE_ALT = "Illustration of a globe representing secure authentication workflows";
13
+ const DEFAULT_IMAGE_BG = "#e2e8f0";
14
+ const DEFAULT_PASSWORD_REQUIREMENTS = {
15
+ minimum_length: 8,
16
+ require_uppercase: true,
17
+ require_lowercase: true,
18
+ require_number: true,
19
+ require_special: false,
20
+ };
21
+ // section: component
22
+ /**
23
+ * Zero-config reset password page component
24
+ * Uses sensible defaults and can be customized via props
25
+ * @param props - Optional configuration overrides
26
+ * @returns Reset password page component
27
+ */
28
+ export function ResetPasswordPage({ errorMessage = "Your password reset link has expired or is invalid", successMessage = "Password reset successful! You can now log in with your new password.", loginPath = "/hazo_auth/login", forgotPasswordPath = "/hazo_auth/forgot_password", passwordRequirements = DEFAULT_PASSWORD_REQUIREMENTS, alreadyLoggedInMessage = "You are already logged in", showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel = "Return home", returnHomePath = "/", imageSrc = DEFAULT_IMAGE_SRC, imageAlt = DEFAULT_IMAGE_ALT, imageBackgroundColor = DEFAULT_IMAGE_BG, } = {}) {
29
+ const [dataClient, setDataClient] = useState(null);
30
+ useEffect(() => {
31
+ // Initialize hazo_connect on client side
32
+ const hazoConnect = create_sqlite_hazo_connect();
33
+ const client = createLayoutDataClient(hazoConnect);
34
+ setDataClient(client);
35
+ }, []);
36
+ // Show loading state while initializing
37
+ if (!dataClient) {
38
+ return (_jsx("div", { className: "cls_reset_password_page_loading flex items-center justify-center min-h-screen", children: _jsx("div", { className: "text-slate-600 animate-pulse", children: "Loading..." }) }));
39
+ }
40
+ const ResetPasswordLayout = reset_password_layout;
41
+ return (_jsx(ResetPasswordLayout, { image_src: imageSrc, image_alt: imageAlt, image_background_color: imageBackgroundColor, data_client: dataClient, errorMessage: errorMessage, successMessage: successMessage, password_requirements: passwordRequirements, alreadyLoggedInMessage: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath }));
42
+ }
43
+ export default ResetPasswordPage;
@@ -0,0 +1,21 @@
1
+ export type VerifyEmailPageProps = {
2
+ alreadyLoggedInMessage?: string;
3
+ showLogoutButton?: boolean;
4
+ showReturnHomeButton?: boolean;
5
+ returnHomeButtonLabel?: string;
6
+ returnHomePath?: string;
7
+ redirectDelay?: number;
8
+ loginPath?: string;
9
+ imageSrc?: string;
10
+ imageAlt?: string;
11
+ imageBackgroundColor?: string;
12
+ };
13
+ /**
14
+ * Zero-config verify email page component
15
+ * Uses sensible defaults and can be customized via props
16
+ * @param props - Optional configuration overrides
17
+ * @returns Verify email page component
18
+ */
19
+ export declare function VerifyEmailPage({ alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, redirectDelay, loginPath, imageSrc, imageAlt, imageBackgroundColor, }?: VerifyEmailPageProps): import("react/jsx-runtime").JSX.Element;
20
+ export default VerifyEmailPage;
21
+ //# sourceMappingURL=verify_email.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify_email.d.ts","sourceRoot":"","sources":["../../src/page_components/verify_email.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,oBAAoB,GAAG;IACjC,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,aAAoB,EACpB,SAA8B,EAC9B,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,oBAAyB,2CAqC3B;AAED,eAAe,eAAe,CAAC"}
@@ -0,0 +1,36 @@
1
+ // file_description: zero-config verify email page component for hazo_auth
2
+ // Consumers can use this directly without needing to configure props
3
+ "use client";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ // section: imports
6
+ import { useEffect, useState } from "react";
7
+ import email_verification_layout from "../components/layouts/email_verification";
8
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
9
+ import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup";
10
+ // section: constants
11
+ const DEFAULT_IMAGE_SRC = "/globe.svg";
12
+ const DEFAULT_IMAGE_ALT = "Illustration of a globe representing secure authentication workflows";
13
+ const DEFAULT_IMAGE_BG = "#e2e8f0";
14
+ // section: component
15
+ /**
16
+ * Zero-config verify email page component
17
+ * Uses sensible defaults and can be customized via props
18
+ * @param props - Optional configuration overrides
19
+ * @returns Verify email page component
20
+ */
21
+ export function VerifyEmailPage({ alreadyLoggedInMessage = "You are already logged in", showLogoutButton = true, showReturnHomeButton = false, returnHomeButtonLabel = "Return home", returnHomePath = "/", redirectDelay = 3000, loginPath = "/hazo_auth/login", imageSrc = DEFAULT_IMAGE_SRC, imageAlt = DEFAULT_IMAGE_ALT, imageBackgroundColor = DEFAULT_IMAGE_BG, } = {}) {
22
+ const [dataClient, setDataClient] = useState(null);
23
+ useEffect(() => {
24
+ // Initialize hazo_connect on client side
25
+ const hazoConnect = create_sqlite_hazo_connect();
26
+ const client = createLayoutDataClient(hazoConnect);
27
+ setDataClient(client);
28
+ }, []);
29
+ // Show loading state while initializing
30
+ if (!dataClient) {
31
+ return (_jsx("div", { className: "cls_verify_email_page_loading flex items-center justify-center min-h-screen", children: _jsx("div", { className: "text-slate-600 animate-pulse", children: "Loading..." }) }));
32
+ }
33
+ const EmailVerificationLayout = email_verification_layout;
34
+ return (_jsx(EmailVerificationLayout, { image_src: imageSrc, image_alt: imageAlt, image_background_color: imageBackgroundColor, data_client: dataClient, already_logged_in_message: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath, redirect_delay: redirectDelay, login_path: loginPath }));
35
+ }
36
+ export default VerifyEmailPage;
@@ -12,6 +12,7 @@ export { PATCH as updateUserPATCH } from "./update_user.js";
12
12
  export { POST as uploadProfilePicturePOST } from "./upload_profile_picture.js";
13
13
  export { DELETE as removeProfilePictureDELETE } from "./remove_profile_picture.js";
14
14
  export { GET as libraryPhotosGET } from "./library_photos.js";
15
+ export { GET as libraryPhotoGET } from "./library_photo.js";
15
16
  export { GET as profilePictureFilenameGET } from "./profile_picture_filename.js";
16
17
  export { POST as getAuthPOST } from "./get_auth.js";
17
18
  export { POST as invalidateCachePOST } from "./invalidate_cache.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/routes/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,GAAG,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,EAAE,GAAG,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,IAAI,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,IAAI,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,GAAG,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,GAAG,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAGjF,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,IAAI,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/server/routes/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,IAAI,SAAS,EAAE,MAAM,YAAY,CAAC;AAC/C,OAAO,EAAE,IAAI,IAAI,YAAY,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,GAAG,IAAI,KAAK,EAAE,MAAM,SAAS,CAAC;AAGvC,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,IAAI,IAAI,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAChE,OAAO,EAAE,IAAI,IAAI,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAClE,OAAO,EAAE,GAAG,IAAI,qBAAqB,EAAE,MAAM,2BAA2B,CAAC;AAGzE,OAAO,EAAE,GAAG,IAAI,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAE,IAAI,IAAI,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAG1E,OAAO,EAAE,KAAK,IAAI,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAC5D,OAAO,EAAE,IAAI,IAAI,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,MAAM,IAAI,0BAA0B,EAAE,MAAM,6BAA6B,CAAC;AACnF,OAAO,EAAE,GAAG,IAAI,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAE,GAAG,IAAI,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,GAAG,IAAI,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAGjF,OAAO,EAAE,IAAI,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,IAAI,IAAI,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -18,6 +18,7 @@ export { PATCH as updateUserPATCH } from "./update_user.js";
18
18
  export { POST as uploadProfilePicturePOST } from "./upload_profile_picture.js";
19
19
  export { DELETE as removeProfilePictureDELETE } from "./remove_profile_picture.js";
20
20
  export { GET as libraryPhotosGET } from "./library_photos.js";
21
+ export { GET as libraryPhotoGET } from "./library_photo.js";
21
22
  export { GET as profilePictureFilenameGET } from "./profile_picture_filename.js";
22
23
  // Auth utility routes
23
24
  export { POST as getAuthPOST } from "./get_auth.js";
@@ -0,0 +1,2 @@
1
+ export { GET } from "../../app/api/hazo_auth/library_photo/[category]/[filename]/route";
2
+ //# sourceMappingURL=library_photo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"library_photo.d.ts","sourceRoot":"","sources":["../../../src/server/routes/library_photo.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,mEAAmE,CAAC"}
@@ -0,0 +1,3 @@
1
+ // file_description: server route export for library photo serving
2
+ // Serves library photos from node_modules when not copied to project's public folder
3
+ export { GET } from "../../app/api/hazo_auth/library_photo/[category]/[filename]/route";
@@ -305,17 +305,21 @@ enable_admin_ui = true
305
305
  # default_super_user_email = admin@example.com
306
306
 
307
307
  [hazo_auth__auth_utility]
308
- # Authentication utility configuration
308
+ # Authentication utility configuration for hazo_get_auth()
309
+ # This function retrieves the current user, their permissions, and role IDs from cookies
310
+ # Results are cached in memory to improve performance on repeated calls
309
311
 
310
312
  # Cache settings
311
313
  # Maximum number of users to cache (LRU eviction, default: 10000)
312
314
  # cache_max_users = 10000
313
315
 
314
- # Cache TTL in minutes (default: 15)
315
- # cache_ttl_minutes = 15
316
+ # Cache TTL in minutes - how long cached auth data is valid (default: 5)
317
+ # After TTL expires, the next call will fetch fresh data from database
318
+ # cache_ttl_minutes = 5
316
319
 
317
- # Force cache refresh if older than this many minutes (default: 30)
318
- # cache_max_age_minutes = 30
320
+ # Force cache refresh if older than this many minutes (default: 10)
321
+ # This is the hard limit - entries older than this are always refreshed
322
+ # cache_max_age_minutes = 10
319
323
 
320
324
  # Rate limiting for /api/auth/get_auth endpoint
321
325
  # Per-user rate limit (requests per minute, default: 100)
@@ -336,6 +340,22 @@ enable_admin_ui = true
336
340
  # Example: admin_user_management:You don't have access to user management,admin_role_management:You don't have access to role management
337
341
  # permission_error_messages =
338
342
 
343
+ [hazo_auth__user_profiles]
344
+ # User profiles cache configuration for hazo_get_user_profiles()
345
+ # This function retrieves basic profile info (name, email, profile picture) for multiple users
346
+ # Used by chat applications and similar use cases where batch user info is needed
347
+ # Results are cached in memory to improve performance on repeated calls
348
+
349
+ # Enable caching (1 = enabled, 0 = disabled, default: 1)
350
+ # cache_enabled = 1
351
+
352
+ # Maximum number of user profiles to cache (LRU eviction, default: 5000)
353
+ # cache_max_entries = 5000
354
+
355
+ # Cache TTL in minutes - how long cached profile data is valid (default: 5)
356
+ # After TTL expires, the next call will fetch fresh data from database
357
+ # cache_ttl_minutes = 5
358
+
339
359
  [hazo_auth__profile_pic_menu]
340
360
  # Profile picture menu configuration
341
361
  # This component can be used in navbar or sidebar to show user profile picture or sign up/sign in buttons
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hazo_auth",
3
- "version": "1.6.0",
3
+ "version": "1.6.2",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -12,6 +12,10 @@
12
12
  "types": "./dist/index.d.ts",
13
13
  "import": "./dist/index.js"
14
14
  },
15
+ "./client": {
16
+ "types": "./dist/client.d.ts",
17
+ "import": "./dist/client.js"
18
+ },
15
19
  "./components/layouts/login": {
16
20
  "types": "./dist/components/layouts/login/index.d.ts",
17
21
  "import": "./dist/components/layouts/login/index.js"
@@ -55,6 +59,34 @@
55
59
  "./server/routes": {
56
60
  "types": "./dist/server/routes/index.d.ts",
57
61
  "import": "./dist/server/routes/index.js"
62
+ },
63
+ "./pages": {
64
+ "types": "./dist/page_components/index.d.ts",
65
+ "import": "./dist/page_components/index.js"
66
+ },
67
+ "./pages/login": {
68
+ "types": "./dist/page_components/login.d.ts",
69
+ "import": "./dist/page_components/login.js"
70
+ },
71
+ "./pages/register": {
72
+ "types": "./dist/page_components/register.d.ts",
73
+ "import": "./dist/page_components/register.js"
74
+ },
75
+ "./pages/forgot_password": {
76
+ "types": "./dist/page_components/forgot_password.d.ts",
77
+ "import": "./dist/page_components/forgot_password.js"
78
+ },
79
+ "./pages/reset_password": {
80
+ "types": "./dist/page_components/reset_password.d.ts",
81
+ "import": "./dist/page_components/reset_password.js"
82
+ },
83
+ "./pages/verify_email": {
84
+ "types": "./dist/page_components/verify_email.d.ts",
85
+ "import": "./dist/page_components/verify_email.js"
86
+ },
87
+ "./pages/my_settings": {
88
+ "types": "./dist/page_components/my_settings.d.ts",
89
+ "import": "./dist/page_components/my_settings.js"
58
90
  }
59
91
  },
60
92
  "files": [