hazo_auth 1.6.7 → 3.0.0

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 (151) hide show
  1. package/README.md +114 -14
  2. package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts.map +1 -1
  3. package/dist/components/layouts/email_verification/hooks/use_email_verification.js +5 -3
  4. package/dist/components/layouts/email_verification/index.d.ts +2 -1
  5. package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
  6. package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts.map +1 -1
  7. package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.js +3 -1
  8. package/dist/components/layouts/forgot_password/index.d.ts +2 -1
  9. package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
  10. package/dist/components/layouts/login/hooks/use_login_form.d.ts.map +1 -1
  11. package/dist/components/layouts/login/hooks/use_login_form.js +3 -1
  12. package/dist/components/layouts/login/index.d.ts +2 -1
  13. package/dist/components/layouts/login/index.d.ts.map +1 -1
  14. package/dist/components/layouts/my_settings/components/profile_picture_dialog.d.ts.map +1 -1
  15. package/dist/components/layouts/my_settings/components/profile_picture_dialog.js +3 -1
  16. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.d.ts.map +1 -1
  17. package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +4 -2
  18. package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts.map +1 -1
  19. package/dist/components/layouts/my_settings/hooks/use_my_settings.js +7 -5
  20. package/dist/components/layouts/my_settings/index.d.ts +2 -1
  21. package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
  22. package/dist/components/layouts/my_settings/index.js +3 -2
  23. package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
  24. package/dist/components/layouts/register/hooks/use_register_form.js +3 -1
  25. package/dist/components/layouts/register/index.d.ts +2 -1
  26. package/dist/components/layouts/register/index.d.ts.map +1 -1
  27. package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts.map +1 -1
  28. package/dist/components/layouts/reset_password/hooks/use_reset_password_form.js +4 -2
  29. package/dist/components/layouts/reset_password/index.d.ts +2 -1
  30. package/dist/components/layouts/reset_password/index.d.ts.map +1 -1
  31. package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts +2 -1
  32. package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts.map +1 -1
  33. package/dist/components/layouts/shared/components/logout_button.d.ts.map +1 -1
  34. package/dist/components/layouts/shared/components/logout_button.js +3 -1
  35. package/dist/components/layouts/shared/components/profile_pic_menu.d.ts.map +1 -1
  36. package/dist/components/layouts/shared/components/profile_pic_menu.js +8 -4
  37. package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts +2 -1
  38. package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts.map +1 -1
  39. package/dist/components/layouts/shared/components/visual_panel.d.ts +2 -1
  40. package/dist/components/layouts/shared/components/visual_panel.d.ts.map +1 -1
  41. package/dist/components/layouts/shared/components/visual_panel.js +2 -1
  42. package/dist/components/layouts/shared/hooks/use_auth_status.d.ts.map +1 -1
  43. package/dist/components/layouts/shared/hooks/use_auth_status.js +4 -2
  44. package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts.map +1 -1
  45. package/dist/components/layouts/shared/hooks/use_hazo_auth.js +4 -2
  46. package/dist/components/layouts/shared/index.d.ts +0 -2
  47. package/dist/components/layouts/shared/index.d.ts.map +1 -1
  48. package/dist/components/layouts/shared/index.js +2 -2
  49. package/dist/components/layouts/user_management/components/roles_matrix.d.ts.map +1 -1
  50. package/dist/components/layouts/user_management/components/roles_matrix.js +8 -6
  51. package/dist/components/layouts/user_management/index.d.ts.map +1 -1
  52. package/dist/components/layouts/user_management/index.js +15 -13
  53. package/dist/contexts/hazo_auth_config.d.ts +18 -0
  54. package/dist/contexts/hazo_auth_config.d.ts.map +1 -0
  55. package/dist/contexts/hazo_auth_config.js +10 -0
  56. package/dist/contexts/hazo_auth_provider.d.ts +73 -0
  57. package/dist/contexts/hazo_auth_provider.d.ts.map +1 -0
  58. package/dist/contexts/hazo_auth_provider.js +82 -0
  59. package/dist/index.d.ts +2 -0
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +3 -0
  62. package/dist/lib/config/default_config.d.ts +237 -0
  63. package/dist/lib/config/default_config.d.ts.map +1 -0
  64. package/dist/lib/config/default_config.js +159 -0
  65. package/dist/lib/email_verification_config.server.d.ts +4 -0
  66. package/dist/lib/email_verification_config.server.d.ts.map +1 -1
  67. package/dist/lib/email_verification_config.server.js +12 -0
  68. package/dist/lib/forgot_password_config.server.d.ts +4 -0
  69. package/dist/lib/forgot_password_config.server.d.ts.map +1 -1
  70. package/dist/lib/forgot_password_config.server.js +12 -0
  71. package/dist/lib/login_config.server.d.ts +4 -0
  72. package/dist/lib/login_config.server.d.ts.map +1 -1
  73. package/dist/lib/login_config.server.js +10 -0
  74. package/dist/lib/password_requirements_config.server.d.ts +1 -1
  75. package/dist/lib/password_requirements_config.server.d.ts.map +1 -1
  76. package/dist/lib/password_requirements_config.server.js +8 -7
  77. package/dist/lib/register_config.server.d.ts +4 -0
  78. package/dist/lib/register_config.server.d.ts.map +1 -1
  79. package/dist/lib/register_config.server.js +10 -0
  80. package/dist/lib/reset_password_config.server.d.ts +4 -0
  81. package/dist/lib/reset_password_config.server.d.ts.map +1 -1
  82. package/dist/lib/reset_password_config.server.js +10 -0
  83. package/dist/page_components/forgot_password.d.ts.map +1 -1
  84. package/dist/page_components/forgot_password.js +14 -0
  85. package/dist/page_components/login.d.ts +4 -0
  86. package/dist/page_components/login.d.ts.map +1 -1
  87. package/dist/page_components/login.js +14 -0
  88. package/dist/page_components/register.d.ts.map +1 -1
  89. package/dist/page_components/register.js +14 -0
  90. package/dist/page_components/reset_password.d.ts.map +1 -1
  91. package/dist/page_components/reset_password.js +14 -0
  92. package/dist/page_components/verify_email.d.ts.map +1 -1
  93. package/dist/page_components/verify_email.js +14 -0
  94. package/dist/pages/forgot_password.d.ts +52 -0
  95. package/dist/pages/forgot_password.d.ts.map +1 -0
  96. package/dist/pages/forgot_password.js +41 -0
  97. package/dist/pages/index.d.ts +33 -0
  98. package/dist/pages/index.d.ts.map +1 -0
  99. package/dist/pages/index.js +28 -0
  100. package/dist/pages/login.d.ts +43 -0
  101. package/dist/pages/login.d.ts.map +1 -0
  102. package/dist/pages/login.js +45 -0
  103. package/dist/pages/my_settings.d.ts +54 -0
  104. package/dist/pages/my_settings.d.ts.map +1 -0
  105. package/dist/pages/my_settings.js +57 -0
  106. package/dist/pages/register.d.ts +44 -0
  107. package/dist/pages/register.d.ts.map +1 -0
  108. package/dist/pages/register.js +46 -0
  109. package/dist/pages/reset_password.d.ts +43 -0
  110. package/dist/pages/reset_password.d.ts.map +1 -0
  111. package/dist/pages/reset_password.js +42 -0
  112. package/dist/pages/verify_email.d.ts +52 -0
  113. package/dist/pages/verify_email.d.ts.map +1 -0
  114. package/dist/pages/verify_email.js +41 -0
  115. package/dist/server_pages/forgot_password.d.ts +53 -0
  116. package/dist/server_pages/forgot_password.d.ts.map +1 -0
  117. package/dist/server_pages/forgot_password.js +40 -0
  118. package/dist/server_pages/forgot_password_client_wrapper.d.ts +15 -0
  119. package/dist/server_pages/forgot_password_client_wrapper.d.ts.map +1 -0
  120. package/dist/server_pages/forgot_password_client_wrapper.js +27 -0
  121. package/dist/server_pages/index.d.ts +13 -0
  122. package/dist/server_pages/index.d.ts.map +1 -0
  123. package/dist/server_pages/index.js +7 -0
  124. package/dist/server_pages/login.d.ts +43 -0
  125. package/dist/server_pages/login.d.ts.map +1 -0
  126. package/dist/server_pages/login.js +39 -0
  127. package/dist/server_pages/login_client_wrapper.d.ts +13 -0
  128. package/dist/server_pages/login_client_wrapper.d.ts.map +1 -0
  129. package/dist/server_pages/login_client_wrapper.js +29 -0
  130. package/dist/server_pages/my_settings.d.ts +53 -0
  131. package/dist/server_pages/my_settings.d.ts.map +1 -0
  132. package/dist/server_pages/my_settings.js +57 -0
  133. package/dist/server_pages/register.d.ts +45 -0
  134. package/dist/server_pages/register.d.ts.map +1 -0
  135. package/dist/server_pages/register.js +41 -0
  136. package/dist/server_pages/register_client_wrapper.d.ts +13 -0
  137. package/dist/server_pages/register_client_wrapper.d.ts.map +1 -0
  138. package/dist/server_pages/register_client_wrapper.js +27 -0
  139. package/dist/server_pages/reset_password.d.ts +44 -0
  140. package/dist/server_pages/reset_password.d.ts.map +1 -0
  141. package/dist/server_pages/reset_password.js +40 -0
  142. package/dist/server_pages/reset_password_client_wrapper.d.ts +13 -0
  143. package/dist/server_pages/reset_password_client_wrapper.d.ts.map +1 -0
  144. package/dist/server_pages/reset_password_client_wrapper.js +27 -0
  145. package/dist/server_pages/verify_email.d.ts +53 -0
  146. package/dist/server_pages/verify_email.d.ts.map +1 -0
  147. package/dist/server_pages/verify_email.js +40 -0
  148. package/dist/server_pages/verify_email_client_wrapper.d.ts +15 -0
  149. package/dist/server_pages/verify_email_client_wrapper.d.ts.map +1 -0
  150. package/dist/server_pages/verify_email_client_wrapper.js +27 -0
  151. package/package.json +34 -10
@@ -1,6 +1,8 @@
1
1
  // file_description: server-only helper to read forgot password layout configuration from hazo_auth_config.ini
2
2
  // section: imports
3
3
  import { get_already_logged_in_config } from "./already_logged_in_config.server";
4
+ import { get_config_value } from "./config/config_loader.server";
5
+ import forgotPasswordDefaultImage from "../assets/images/forgot_password_default.jpg";
4
6
  // section: helpers
5
7
  /**
6
8
  * Reads forgot password layout configuration from hazo_auth_config.ini file
@@ -8,13 +10,23 @@ import { get_already_logged_in_config } from "./already_logged_in_config.server"
8
10
  * @returns Forgot password configuration options
9
11
  */
10
12
  export function get_forgot_password_config() {
13
+ const section = "hazo_auth__forgot_password_layout";
11
14
  // Get shared already logged in config
12
15
  const alreadyLoggedInConfig = get_already_logged_in_config();
16
+ // Read image configuration
17
+ // If not set in config, falls back to default image from assets
18
+ const imageSrc = get_config_value(section, "image_src", "" // Empty string means not set in config
19
+ ) || forgotPasswordDefaultImage;
20
+ const imageAlt = get_config_value(section, "image_alt", "Password recovery illustration");
21
+ const imageBackgroundColor = get_config_value(section, "image_background_color", "#f1f5f9");
13
22
  return {
14
23
  alreadyLoggedInMessage: alreadyLoggedInConfig.message,
15
24
  showLogoutButton: alreadyLoggedInConfig.showLogoutButton,
16
25
  showReturnHomeButton: alreadyLoggedInConfig.showReturnHomeButton,
17
26
  returnHomeButtonLabel: alreadyLoggedInConfig.returnHomeButtonLabel,
18
27
  returnHomePath: alreadyLoggedInConfig.returnHomePath,
28
+ imageSrc,
29
+ imageAlt,
30
+ imageBackgroundColor,
19
31
  };
20
32
  }
@@ -1,3 +1,4 @@
1
+ import type { StaticImageData } from "next/image";
1
2
  export type LoginConfig = {
2
3
  redirectRoute?: string;
3
4
  successMessage: string;
@@ -10,6 +11,9 @@ export type LoginConfig = {
10
11
  forgotPasswordLabel: string;
11
12
  createAccountPath: string;
12
13
  createAccountLabel: string;
14
+ imageSrc: string | StaticImageData;
15
+ imageAlt: string;
16
+ imageBackgroundColor: string;
13
17
  };
14
18
  /**
15
19
  * Reads login layout configuration from hazo_auth_config.ini file
@@ -1 +1 @@
1
- {"version":3,"file":"login_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/login_config.server.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;CAC5B,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CA2C9C"}
1
+ {"version":3,"file":"login_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/login_config.server.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,WAAW,GAAG;IACxB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,EAAE,MAAM,CAAC;IACvB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,mBAAmB,EAAE,MAAM,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,QAAQ,EAAE,MAAM,GAAG,eAAe,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,gBAAgB,IAAI,WAAW,CAiE9C"}
@@ -2,6 +2,7 @@
2
2
  // section: imports
3
3
  import { get_config_value } from "./config/config_loader.server";
4
4
  import { get_already_logged_in_config } from "./already_logged_in_config.server";
5
+ import loginDefaultImage from "../assets/images/login_default.jpg";
5
6
  // section: helpers
6
7
  /**
7
8
  * Reads login layout configuration from hazo_auth_config.ini file
@@ -21,6 +22,12 @@ export function get_login_config() {
21
22
  const createAccountLabel = get_config_value(section, "create_account_label", "Create account");
22
23
  // Get shared already logged in config
23
24
  const alreadyLoggedInConfig = get_already_logged_in_config();
25
+ // Read image configuration
26
+ // If not set in config, falls back to default image from assets
27
+ const imageSrc = get_config_value(section, "image_src", "" // Empty string means not set in config
28
+ ) || loginDefaultImage;
29
+ const imageAlt = get_config_value(section, "image_alt", "Secure login illustration");
30
+ const imageBackgroundColor = get_config_value(section, "image_background_color", "#f1f5f9");
24
31
  return {
25
32
  redirectRoute,
26
33
  successMessage,
@@ -33,5 +40,8 @@ export function get_login_config() {
33
40
  forgotPasswordLabel,
34
41
  createAccountPath,
35
42
  createAccountLabel,
43
+ imageSrc,
44
+ imageAlt,
45
+ imageBackgroundColor,
36
46
  };
37
47
  }
@@ -7,7 +7,7 @@ export type PasswordRequirementsConfig = {
7
7
  };
8
8
  /**
9
9
  * Reads shared password requirements configuration from hazo_auth_config.ini file
10
- * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
10
+ * Falls back to centralized defaults if hazo_auth_config.ini is not found or section is missing
11
11
  * This configuration is used by both register and reset password layouts
12
12
  * @returns Password requirements configuration options
13
13
  */
@@ -1 +1 @@
1
- {"version":3,"file":"password_requirements_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/password_requirements_config.server.ts"],"names":[],"mappings":"AAKA,MAAM,MAAM,0BAA0B,GAAG;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,0BAA0B,CAiB7E"}
1
+ {"version":3,"file":"password_requirements_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/password_requirements_config.server.ts"],"names":[],"mappings":"AAMA,MAAM,MAAM,0BAA0B,GAAG;IACvC,cAAc,EAAE,MAAM,CAAC;IACvB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,OAAO,CAAC;CAC1B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,gCAAgC,IAAI,0BAA0B,CAiB7E"}
@@ -1,21 +1,22 @@
1
1
  // file_description: server-only helper to read shared password requirements configuration from hazo_auth_config.ini
2
2
  // section: imports
3
3
  import { get_config_number, get_config_boolean } from "./config/config_loader.server";
4
+ import { DEFAULT_PASSWORD_REQUIREMENTS } from "./config/default_config";
4
5
  // section: helpers
5
6
  /**
6
7
  * Reads shared password requirements configuration from hazo_auth_config.ini file
7
- * Falls back to defaults if hazo_auth_config.ini is not found or section is missing
8
+ * Falls back to centralized defaults if hazo_auth_config.ini is not found or section is missing
8
9
  * This configuration is used by both register and reset password layouts
9
10
  * @returns Password requirements configuration options
10
11
  */
11
12
  export function get_password_requirements_config() {
12
13
  const section = "hazo_auth__password_requirements";
13
- // Read password requirements with defaults
14
- const minimum_length = get_config_number(section, "minimum_length", 8);
15
- const require_uppercase = get_config_boolean(section, "require_uppercase", false);
16
- const require_lowercase = get_config_boolean(section, "require_lowercase", false);
17
- const require_number = get_config_boolean(section, "require_number", false);
18
- const require_special = get_config_boolean(section, "require_special", false);
14
+ // Read password requirements with centralized defaults
15
+ const minimum_length = get_config_number(section, "minimum_length", DEFAULT_PASSWORD_REQUIREMENTS.minimum_length);
16
+ const require_uppercase = get_config_boolean(section, "require_uppercase", DEFAULT_PASSWORD_REQUIREMENTS.require_uppercase);
17
+ const require_lowercase = get_config_boolean(section, "require_lowercase", DEFAULT_PASSWORD_REQUIREMENTS.require_lowercase);
18
+ const require_number = get_config_boolean(section, "require_number", DEFAULT_PASSWORD_REQUIREMENTS.require_number);
19
+ const require_special = get_config_boolean(section, "require_special", DEFAULT_PASSWORD_REQUIREMENTS.require_special);
19
20
  return {
20
21
  minimum_length,
21
22
  require_uppercase,
@@ -1,3 +1,4 @@
1
+ import type { StaticImageData } from "next/image";
1
2
  export type RegisterConfig = {
2
3
  showNameField: boolean;
3
4
  passwordRequirements: {
@@ -14,6 +15,9 @@ export type RegisterConfig = {
14
15
  returnHomePath: string;
15
16
  signInPath: string;
16
17
  signInLabel: string;
18
+ imageSrc: string | StaticImageData;
19
+ imageAlt: string;
20
+ imageBackgroundColor: string;
17
21
  };
18
22
  /**
19
23
  * Reads register layout configuration from hazo_auth_config.ini file
@@ -1 +1 @@
1
- {"version":3,"file":"register_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/register_config.server.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,iBAAiB,EAAE,OAAO,CAAC;QAC3B,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,cAAc,CAuCpD"}
1
+ {"version":3,"file":"register_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/register_config.server.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,oBAAoB,EAAE;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,iBAAiB,EAAE,OAAO,CAAC;QAC3B,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,GAAG,eAAe,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,cAAc,CA6DpD"}
@@ -4,6 +4,7 @@ import { get_config_boolean, get_config_value, read_config_section } from "./con
4
4
  import { get_password_requirements_config } from "./password_requirements_config.server";
5
5
  import { get_already_logged_in_config } from "./already_logged_in_config.server";
6
6
  import { get_user_fields_config } from "./user_fields_config.server";
7
+ import registerDefaultImage from "../assets/images/register_default.jpg";
7
8
  // section: helpers
8
9
  /**
9
10
  * Reads register layout configuration from hazo_auth_config.ini file
@@ -25,6 +26,12 @@ export function get_register_config() {
25
26
  // Read sign in link configuration
26
27
  const signInPath = get_config_value("hazo_auth__register_layout", "sign_in_path", "/hazo_auth/login");
27
28
  const signInLabel = get_config_value("hazo_auth__register_layout", "sign_in_label", "Sign in");
29
+ // Read image configuration
30
+ // If not set in config, falls back to default image from assets
31
+ const imageSrc = get_config_value("hazo_auth__register_layout", "image_src", "" // Empty string means not set in config
32
+ ) || registerDefaultImage;
33
+ const imageAlt = get_config_value("hazo_auth__register_layout", "image_alt", "Modern building representing user registration");
34
+ const imageBackgroundColor = get_config_value("hazo_auth__register_layout", "image_background_color", "#e2e8f0");
28
35
  return {
29
36
  showNameField,
30
37
  passwordRequirements,
@@ -35,5 +42,8 @@ export function get_register_config() {
35
42
  returnHomePath: alreadyLoggedInConfig.returnHomePath,
36
43
  signInPath,
37
44
  signInLabel,
45
+ imageSrc,
46
+ imageAlt,
47
+ imageBackgroundColor,
38
48
  };
39
49
  }
@@ -1,3 +1,4 @@
1
+ import type { StaticImageData } from "next/image";
1
2
  export type ResetPasswordConfig = {
2
3
  errorMessage: string;
3
4
  successMessage: string;
@@ -15,6 +16,9 @@ export type ResetPasswordConfig = {
15
16
  require_number: boolean;
16
17
  require_special: boolean;
17
18
  };
19
+ imageSrc: string | StaticImageData;
20
+ imageAlt: string;
21
+ imageBackgroundColor: string;
18
22
  };
19
23
  /**
20
24
  * Reads reset password layout configuration from hazo_auth_config.ini file
@@ -1 +1 @@
1
- {"version":3,"file":"reset_password_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/reset_password_config.server.ts"],"names":[],"mappings":"AAOA,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,iBAAiB,EAAE,OAAO,CAAC;QAC3B,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC;CACH,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,mBAAmB,CAyC/D"}
1
+ {"version":3,"file":"reset_password_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/reset_password_config.server.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,EAAE,MAAM,CAAC;IACrB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,CAAC;IAClB,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sBAAsB,EAAE,MAAM,CAAC;IAC/B,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,CAAC;IAC9B,cAAc,EAAE,MAAM,CAAC;IACvB,oBAAoB,EAAE;QACpB,cAAc,EAAE,MAAM,CAAC;QACvB,iBAAiB,EAAE,OAAO,CAAC;QAC3B,iBAAiB,EAAE,OAAO,CAAC;QAC3B,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC;KAC1B,CAAC;IACF,QAAQ,EAAE,MAAM,GAAG,eAAe,CAAC;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,yBAAyB,IAAI,mBAAmB,CA+D/D"}
@@ -3,6 +3,7 @@
3
3
  import { get_config_value } from "./config/config_loader.server";
4
4
  import { get_already_logged_in_config } from "./already_logged_in_config.server";
5
5
  import { get_password_requirements_config } from "./password_requirements_config.server";
6
+ import resetPasswordDefaultImage from "../assets/images/reset_password_default.jpg";
6
7
  // section: helpers
7
8
  /**
8
9
  * Reads reset password layout configuration from hazo_auth_config.ini file
@@ -23,6 +24,12 @@ export function get_reset_password_config() {
23
24
  const forgotPasswordPath = get_config_value(section, "forgot_password_path", "/hazo_auth/forgot_password");
24
25
  // Get shared password requirements
25
26
  const passwordRequirements = get_password_requirements_config();
27
+ // Read image configuration
28
+ // If not set in config, falls back to default image from assets
29
+ const imageSrc = get_config_value(section, "image_src", "" // Empty string means not set in config
30
+ ) || resetPasswordDefaultImage;
31
+ const imageAlt = get_config_value(section, "image_alt", "Reset password illustration");
32
+ const imageBackgroundColor = get_config_value(section, "image_background_color", "#f1f5f9");
26
33
  return {
27
34
  errorMessage,
28
35
  successMessage,
@@ -34,5 +41,8 @@ export function get_reset_password_config() {
34
41
  returnHomeButtonLabel: alreadyLoggedInConfig.returnHomeButtonLabel,
35
42
  returnHomePath: alreadyLoggedInConfig.returnHomePath,
36
43
  passwordRequirements,
44
+ imageSrc,
45
+ imageAlt,
46
+ imageBackgroundColor,
37
47
  };
38
48
  }
@@ -1 +1 @@
1
- {"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/page_components/forgot_password.tsx"],"names":[],"mappings":"AAiBA,MAAM,MAAM,uBAAuB,GAAG;IACpC,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,kBAAkB,CAAC,EACjC,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,uBAA4B,2CAmC9B;AAED,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/page_components/forgot_password.tsx"],"names":[],"mappings":"AA+BA,MAAM,MAAM,uBAAuB,GAAG;IACpC,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,kBAAkB,CAAC,EACjC,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,uBAA4B,2CAmC9B;AAED,eAAe,kBAAkB,CAAC"}
@@ -1,5 +1,19 @@
1
1
  // file_description: zero-config forgot password page component for hazo_auth
2
2
  // Consumers can use this directly without needing to configure props
3
+ //
4
+ // ⚠️ DEPRECATED: This client component is deprecated in hazo_auth v2.0+
5
+ // Please use the new server component version instead:
6
+ //
7
+ // import { ForgotPasswordPage } from "hazo_auth/pages/forgot_password";
8
+ //
9
+ // The new version:
10
+ // - Initializes on the server (no loading state)
11
+ // - Works with your app's hazo_connect instance
12
+ // - True zero-config "drop in and use"
13
+ // - Better performance (smaller bundle)
14
+ //
15
+ // This file will be removed in v3.0
16
+ //
3
17
  "use client";
4
18
  import { jsx as _jsx } from "react/jsx-runtime";
5
19
  // section: imports
@@ -1,3 +1,7 @@
1
+ /**
2
+ * @deprecated This client component is deprecated in hazo_auth v2.0+
3
+ * Use the new server component version instead: `import { LoginPage } from "hazo_auth/pages/login"`
4
+ */
1
5
  export type LoginPageProps = {
2
6
  redirectRoute?: string;
3
7
  successMessage?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/page_components/login.tsx"],"names":[],"mappings":"AAkBA,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,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,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,cAAyC,EACzC,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,kBAAiD,EACjD,mBAAwC,EACxC,iBAAyC,EACzC,kBAAqC,EACrC,UAAU,EACV,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,cAAmB,2CA8CrB;AAED,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/page_components/login.tsx"],"names":[],"mappings":"AAgCA;;;GAGG;AACH,MAAM,MAAM,cAAc,GAAG;IAC3B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,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,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,EACxB,aAAa,EACb,cAAyC,EACzC,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,kBAAiD,EACjD,mBAAwC,EACxC,iBAAyC,EACzC,kBAAqC,EACrC,UAAU,EACV,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,cAAmB,2CA8CrB;AAED,eAAe,SAAS,CAAC"}
@@ -1,5 +1,19 @@
1
1
  // file_description: zero-config login page component for hazo_auth
2
2
  // Consumers can use this directly without needing to configure props
3
+ //
4
+ // ⚠️ DEPRECATED: This client component is deprecated in hazo_auth v2.0+
5
+ // Please use the new server component version instead:
6
+ //
7
+ // import { LoginPage } from "hazo_auth/pages/login";
8
+ //
9
+ // The new version:
10
+ // - Initializes on the server (no loading state)
11
+ // - Works with your app's hazo_connect instance
12
+ // - True zero-config "drop in and use"
13
+ // - Better performance (smaller bundle)
14
+ //
15
+ // This file will be removed in v3.0
16
+ //
3
17
  "use client";
4
18
  import { jsx as _jsx } from "react/jsx-runtime";
5
19
  // section: imports
@@ -1 +1 @@
1
- {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/page_components/register.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AAgB7G,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,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,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,aAAoB,EACpB,oBAAoD,EACpD,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,UAA+B,EAC/B,WAAuB,EACvB,UAAU,EACV,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,iBAAsB,2CAwCxB;AAED,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/page_components/register.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,0DAA0D,CAAC;AAgB7G,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,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,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,MAAM,CAAC;CAC/B,CAAC;AAGF;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,aAAoB,EACpB,oBAAoD,EACpD,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,UAA+B,EAC/B,WAAuB,EACvB,UAAU,EACV,QAA4B,EAC5B,QAA4B,EAC5B,oBAAuC,GACxC,GAAE,iBAAsB,2CAwCxB;AAED,eAAe,YAAY,CAAC"}
@@ -1,5 +1,19 @@
1
1
  // file_description: zero-config register page component for hazo_auth
2
2
  // Consumers can use this directly without needing to configure props
3
+ //
4
+ // ⚠️ DEPRECATED: This client component is deprecated in hazo_auth v2.0+
5
+ // Please use the new server component version instead:
6
+ //
7
+ // import { RegisterPage } from "hazo_auth/pages/register";
8
+ //
9
+ // The new version:
10
+ // - Initializes on the server (no loading state)
11
+ // - Works with your app's hazo_connect instance
12
+ // - True zero-config "drop in and use"
13
+ // - Better performance (smaller bundle)
14
+ //
15
+ // This file will be removed in v3.0
16
+ //
3
17
  "use client";
4
18
  import { jsx as _jsx } from "react/jsx-runtime";
5
19
  // section: imports
@@ -1 +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"}
1
+ {"version":3,"file":"reset_password.d.ts","sourceRoot":"","sources":["../../src/page_components/reset_password.tsx"],"names":[],"mappings":"AAwBA,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"}
@@ -1,5 +1,19 @@
1
1
  // file_description: zero-config reset password page component for hazo_auth
2
2
  // Consumers can use this directly without needing to configure props
3
+ //
4
+ // ⚠️ DEPRECATED: This client component is deprecated in hazo_auth v2.0+
5
+ // Please use the new server component version instead:
6
+ //
7
+ // import { ResetPasswordPage } from "hazo_auth/pages/reset_password";
8
+ //
9
+ // The new version:
10
+ // - Initializes on the server (no loading state)
11
+ // - Works with your app's hazo_connect instance
12
+ // - True zero-config "drop in and use"
13
+ // - Better performance (smaller bundle)
14
+ //
15
+ // This file will be removed in v3.0
16
+ //
3
17
  "use client";
4
18
  import { jsx as _jsx } from "react/jsx-runtime";
5
19
  // section: imports
@@ -1 +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"}
1
+ {"version":3,"file":"verify_email.d.ts","sourceRoot":"","sources":["../../src/page_components/verify_email.tsx"],"names":[],"mappings":"AA+BA,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"}
@@ -1,5 +1,19 @@
1
1
  // file_description: zero-config verify email page component for hazo_auth
2
2
  // Consumers can use this directly without needing to configure props
3
+ //
4
+ // ⚠️ DEPRECATED: This client component is deprecated in hazo_auth v2.0+
5
+ // Please use the new server component version instead:
6
+ //
7
+ // import { VerifyEmailPage } from "hazo_auth/pages/verify_email";
8
+ //
9
+ // The new version:
10
+ // - Initializes on the server (no loading state)
11
+ // - Works with your app's hazo_connect instance
12
+ // - True zero-config "drop in and use"
13
+ // - Better performance (smaller bundle)
14
+ //
15
+ // This file will be removed in v3.0
16
+ //
3
17
  "use client";
4
18
  import { jsx as _jsx } from "react/jsx-runtime";
5
19
  // section: imports
@@ -0,0 +1,52 @@
1
+ export type ForgotPasswordPageProps = {
2
+ /**
3
+ * Optional image source for the visual panel
4
+ * @default "/globe.svg" (from default_config.ts)
5
+ */
6
+ image_src?: string;
7
+ /**
8
+ * Optional image alt text
9
+ * @default "Password recovery illustration"
10
+ */
11
+ image_alt?: string;
12
+ /**
13
+ * Optional image background color
14
+ * @default "#f1f5f9"
15
+ */
16
+ image_background_color?: string;
17
+ /**
18
+ * Optional path to sign in page
19
+ * @default "/hazo_auth/login" (from default_config.ts)
20
+ */
21
+ sign_in_path?: string;
22
+ /**
23
+ * Optional sign in link label
24
+ * @default "Back to login" (from default_config.ts)
25
+ */
26
+ sign_in_label?: string;
27
+ };
28
+ /**
29
+ * Zero-config ForgotPasswordPage server component
30
+ *
31
+ * This component initializes everything server-side:
32
+ * - Database connection via hazo_connect singleton
33
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
34
+ * - Layout data client
35
+ *
36
+ * Usage in consuming apps:
37
+ * ```tsx
38
+ * // app/forgot-password/page.tsx
39
+ * import { ForgotPasswordPage } from "hazo_auth/pages/forgot_password";
40
+ *
41
+ * export default function Page() {
42
+ * return <ForgotPasswordPage />;
43
+ * }
44
+ * ```
45
+ *
46
+ * Zero configuration required - works out of the box!
47
+ *
48
+ * @param props - Optional visual and navigation customization props
49
+ * @returns Server-rendered forgot password page
50
+ */
51
+ export default function ForgotPasswordPage({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, }: ForgotPasswordPageProps): import("react/jsx-runtime").JSX.Element;
52
+ //# sourceMappingURL=forgot_password.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/pages/forgot_password.tsx"],"names":[],"mappings":"AASA,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,kBAAkB,CAAC,EACzC,SAAsC,EACtC,SAA4C,EAC5C,sBAAkC,EAClC,YAAgD,EAChD,aAAkD,GACnD,EAAE,uBAAuB,2CAwBzB"}
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ // file_description: Zero-config ForgotPasswordPage server component - drop in and use with no configuration required
3
+ // section: imports
4
+ import { get_hazo_connect_instance } from "../lib/hazo_connect_instance.server";
5
+ import { createLayoutDataClient } from "../components/layouts/shared/data/layout_data_client";
6
+ import { get_forgot_password_config } from "../lib/forgot_password_config.server";
7
+ import ForgotPasswordLayout from "../components/layouts/forgot_password";
8
+ import { DEFAULT_UI_SHELL, DEFAULT_FORGOT_PASSWORD } from "../lib/config/default_config";
9
+ // section: component
10
+ /**
11
+ * Zero-config ForgotPasswordPage server component
12
+ *
13
+ * This component initializes everything server-side:
14
+ * - Database connection via hazo_connect singleton
15
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
16
+ * - Layout data client
17
+ *
18
+ * Usage in consuming apps:
19
+ * ```tsx
20
+ * // app/forgot-password/page.tsx
21
+ * import { ForgotPasswordPage } from "hazo_auth/pages/forgot_password";
22
+ *
23
+ * export default function Page() {
24
+ * return <ForgotPasswordPage />;
25
+ * }
26
+ * ```
27
+ *
28
+ * Zero configuration required - works out of the box!
29
+ *
30
+ * @param props - Optional visual and navigation customization props
31
+ * @returns Server-rendered forgot password page
32
+ */
33
+ export default function ForgotPasswordPage({ image_src = DEFAULT_UI_SHELL.image_src, image_alt = "Password recovery illustration", image_background_color = "#f1f5f9", sign_in_path = DEFAULT_FORGOT_PASSWORD.loginPath, sign_in_label = DEFAULT_FORGOT_PASSWORD.loginLabel, }) {
34
+ // Initialize database connection server-side
35
+ const hazoConnect = get_hazo_connect_instance();
36
+ const dataClient = createLayoutDataClient(hazoConnect);
37
+ // Load configuration from INI file (with defaults)
38
+ const config = get_forgot_password_config();
39
+ // Render layout with all server-initialized dependencies
40
+ return (_jsx(ForgotPasswordLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, sign_in_path: sign_in_path, sign_in_label: sign_in_label, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath }));
41
+ }
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Zero-config page components for hazo_auth v2.0+
3
+ *
4
+ * These are server components that initialize everything on the server:
5
+ * - Database connection via hazo_connect singleton
6
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
7
+ * - All required dependencies and props
8
+ *
9
+ * Usage in consuming apps:
10
+ * ```tsx
11
+ * // app/login/page.tsx
12
+ * import { LoginPage } from "hazo_auth/pages";
13
+ *
14
+ * export default function Page() {
15
+ * return <LoginPage />;
16
+ * }
17
+ * ```
18
+ *
19
+ * All pages work out-of-the-box with ZERO configuration required!
20
+ */
21
+ export { default as LoginPage } from "./login";
22
+ export { default as RegisterPage } from "./register";
23
+ export { default as VerifyEmailPage } from "./verify_email";
24
+ export { default as ForgotPasswordPage } from "./forgot_password";
25
+ export { default as ResetPasswordPage } from "./reset_password";
26
+ export { default as MySettingsPage } from "./my_settings";
27
+ export type { LoginPageProps } from "./login";
28
+ export type { RegisterPageProps } from "./register";
29
+ export type { VerifyEmailPageProps } from "./verify_email";
30
+ export type { ForgotPasswordPageProps } from "./forgot_password";
31
+ export type { ResetPasswordPageProps } from "./reset_password";
32
+ export type { MySettingsPageProps } from "./my_settings";
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/pages/index.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,OAAO,IAAI,SAAS,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EAAE,OAAO,IAAI,YAAY,EAAE,MAAM,YAAY,CAAC;AACrD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,eAAe,CAAC;AAG1D,YAAY,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAC9C,YAAY,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
@@ -0,0 +1,28 @@
1
+ // file_description: Barrel export for all zero-config page components
2
+ // section: exports
3
+ /**
4
+ * Zero-config page components for hazo_auth v2.0+
5
+ *
6
+ * These are server components that initialize everything on the server:
7
+ * - Database connection via hazo_connect singleton
8
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
9
+ * - All required dependencies and props
10
+ *
11
+ * Usage in consuming apps:
12
+ * ```tsx
13
+ * // app/login/page.tsx
14
+ * import { LoginPage } from "hazo_auth/pages";
15
+ *
16
+ * export default function Page() {
17
+ * return <LoginPage />;
18
+ * }
19
+ * ```
20
+ *
21
+ * All pages work out-of-the-box with ZERO configuration required!
22
+ */
23
+ export { default as LoginPage } from "./login";
24
+ export { default as RegisterPage } from "./register";
25
+ export { default as VerifyEmailPage } from "./verify_email";
26
+ export { default as ForgotPasswordPage } from "./forgot_password";
27
+ export { default as ResetPasswordPage } from "./reset_password";
28
+ export { default as MySettingsPage } from "./my_settings";
@@ -0,0 +1,43 @@
1
+ export type LoginPageProps = {
2
+ /**
3
+ * Optional image source for the visual panel
4
+ * @default "/globe.svg" (from default_config.ts)
5
+ */
6
+ image_src?: string;
7
+ /**
8
+ * Optional image alt text
9
+ * @default "Login illustration"
10
+ */
11
+ image_alt?: string;
12
+ /**
13
+ * Optional image background color
14
+ * @default "#f1f5f9"
15
+ */
16
+ image_background_color?: string;
17
+ };
18
+ /**
19
+ * Zero-config LoginPage server component
20
+ *
21
+ * This component initializes everything server-side:
22
+ * - Database connection via hazo_connect singleton
23
+ * - Configuration from hazo_auth_config.ini (with sensible defaults)
24
+ * - Logger instance
25
+ * - Layout data client
26
+ *
27
+ * Usage in consuming apps:
28
+ * ```tsx
29
+ * // app/login/page.tsx
30
+ * import { LoginPage } from "hazo_auth/pages/login";
31
+ *
32
+ * export default function Page() {
33
+ * return <LoginPage />;
34
+ * }
35
+ * ```
36
+ *
37
+ * Zero configuration required - works out of the box!
38
+ *
39
+ * @param props - Optional visual customization props
40
+ * @returns Server-rendered login page
41
+ */
42
+ export default function LoginPage({ image_src, image_alt, image_background_color, }: LoginPageProps): import("react/jsx-runtime").JSX.Element;
43
+ //# sourceMappingURL=login.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/pages/login.tsx"],"names":[],"mappings":"AAUA,MAAM,MAAM,cAAc,GAAG;IAC3B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,SAAsC,EACtC,SAAgC,EAChC,sBAAkC,GACnC,EAAE,cAAc,2CAgChB"}