hazo_auth 10.26.2 → 10.27.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.
- package/cli-src/lib/auth/auth_types.ts +6 -0
- package/cli-src/lib/auth/hazo_get_auth.server.ts +1 -0
- package/cli-src/lib/services/registration_service.ts +29 -4
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts +0 -8
- package/dist/components/layouts/my_settings/hooks/use_my_settings.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/hooks/use_my_settings.js +0 -37
- package/dist/components/layouts/my_settings/index.d.ts +1 -6
- package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/index.js +3 -3
- package/dist/components/layouts/register/hooks/use_register_form.d.ts +1 -15
- package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.js +4 -69
- package/dist/components/layouts/register/index.d.ts +1 -7
- package/dist/components/layouts/register/index.d.ts.map +1 -1
- package/dist/components/layouts/register/index.js +3 -24
- package/dist/components/layouts/shared/hooks/use_auth_status.d.ts +0 -3
- package/dist/components/layouts/shared/hooks/use_auth_status.d.ts.map +1 -1
- package/dist/components/layouts/shared/hooks/use_auth_status.js +2 -5
- package/dist/components/layouts/user_management/components/user_signup_stats_cards.d.ts +8 -1
- package/dist/components/layouts/user_management/components/user_signup_stats_cards.d.ts.map +1 -1
- package/dist/components/layouts/user_management/components/user_signup_stats_cards.js +90 -8
- package/dist/components/ui/alert-dialog.d.ts +9 -9
- package/dist/components/ui/alert-dialog.d.ts.map +1 -1
- package/dist/components/ui/avatar.d.ts +3 -4
- package/dist/components/ui/avatar.d.ts.map +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/components/ui/checkbox.d.ts +1 -2
- package/dist/components/ui/checkbox.d.ts.map +1 -1
- package/dist/components/ui/dialog.d.ts +8 -8
- package/dist/components/ui/dialog.d.ts.map +1 -1
- package/dist/components/ui/dropdown-menu.d.ts +17 -17
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/components/ui/hover-card.d.ts +3 -3
- package/dist/components/ui/hover-card.d.ts.map +1 -1
- package/dist/components/ui/input-otp.d.ts +1 -27
- package/dist/components/ui/input-otp.d.ts.map +1 -1
- package/dist/components/ui/label.d.ts +1 -2
- package/dist/components/ui/label.d.ts.map +1 -1
- package/dist/components/ui/select.d.ts +10 -10
- package/dist/components/ui/select.d.ts.map +1 -1
- package/dist/components/ui/separator.d.ts +1 -2
- package/dist/components/ui/separator.d.ts.map +1 -1
- package/dist/components/ui/sheet.d.ts +9 -9
- package/dist/components/ui/sheet.d.ts.map +1 -1
- package/dist/components/ui/sidebar.d.ts +1 -1
- package/dist/components/ui/sidebar.d.ts.map +1 -1
- package/dist/components/ui/switch.d.ts +1 -2
- package/dist/components/ui/switch.d.ts.map +1 -1
- package/dist/components/ui/tabs.d.ts +4 -4
- package/dist/components/ui/tabs.d.ts.map +1 -1
- package/dist/components/ui/tooltip.d.ts +4 -4
- package/dist/components/ui/tooltip.d.ts.map +1 -1
- package/dist/components/ui/tree-view.d.ts +1 -2
- package/dist/components/ui/tree-view.d.ts.map +1 -1
- package/dist/components/ui/vertical-tabs.d.ts +4 -4
- package/dist/components/ui/vertical-tabs.d.ts.map +1 -1
- package/dist/lib/auth/auth_types.d.ts +0 -3
- package/dist/lib/auth/auth_types.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_auth.server.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_auth.server.js +0 -3
- package/dist/lib/my_settings_config.server.d.ts +0 -4
- package/dist/lib/my_settings_config.server.d.ts.map +1 -1
- package/dist/lib/my_settings_config.server.js +0 -3
- package/dist/lib/register_config.server.d.ts +0 -10
- package/dist/lib/register_config.server.d.ts.map +1 -1
- package/dist/lib/register_config.server.js +0 -7
- package/dist/lib/services/registration_service.d.ts +11 -0
- package/dist/lib/services/registration_service.d.ts.map +1 -1
- package/dist/lib/services/registration_service.js +0 -11
- package/dist/lib/services/user_update_service.d.ts +0 -5
- package/dist/lib/services/user_update_service.d.ts.map +1 -1
- package/dist/lib/services/user_update_service.js +0 -2
- package/dist/locales/en.json +0 -10
- package/dist/page_components/my_settings.d.ts +1 -9
- package/dist/page_components/my_settings.d.ts.map +1 -1
- package/dist/page_components/my_settings.js +2 -8
- package/dist/server/routes/me.d.ts.map +1 -1
- package/dist/server/routes/me.js +1 -5
- package/dist/server/routes/register.d.ts.map +1 -1
- package/dist/server/routes/register.js +0 -46
- package/dist/server/routes/update_user.d.ts.map +1 -1
- package/dist/server/routes/update_user.js +1 -24
- package/dist/server/routes/user_management_users.d.ts +1 -1
- package/dist/server_pages/my_settings.d.ts.map +1 -1
- package/dist/server_pages/my_settings.js +1 -1
- package/dist/server_pages/register.d.ts.map +1 -1
- package/dist/server_pages/register.js +1 -1
- package/dist/server_pages/register_client_wrapper.d.ts +2 -4
- package/dist/server_pages/register_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/register_client_wrapper.js +2 -2
- package/package.json +11 -11
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tree-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"tree-view.d.ts","sourceRoot":"","sources":["../../../src/components/ui/tree-view.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAA;AAkBzB,UAAU,YAAY;IAClB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAClD,YAAY,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAA;IAC1D,QAAQ,CAAC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AE,CAAC,MAAM,EAAE,oBAAoB,KAAK,KAAK,CAAC,SAAS,CAAA;IAC9D,KAAK,CAAC,EAAE,MAAM,CAAA;CACjB,sBAqGA,CAAA;AAED,QAAA,MAAM,QAAQ;UAGA,YAAY;WACX,MAAM;qBACI,MAAM;wBACH,CAAC,IAAI,EAAE,YAAY,GAAG,SAAS,KAAK,IAAI;sBAC1C,KAAK,CAAC,aAAa,CAAC;QAAE,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;sBAC3C,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI;iBACjC,CAAC,IAAI,EAAE,YAAY,KAAK,IAAI;iBAC5B,YAAY,GAAG,IAAI;iBACnB,CAAC,MAAM,EAAE,oBAAoB,KAAK,KAAK,CAAC,SAAS;wCAoGrE,CAAA;AAGD,QAAA,MAAM,gBAAgB;eAGH,KAAK,CAAC,SAAS;wCA2BhC,CAAA;AAGF,QAAA,MAAM,gBAAgB,6DAcpB,CAAA;AAgDF,OAAO,EACH,QAAQ,EACR,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,gBAAgB,EAChB,gBAAgB,EAChB,QAAQ,EACR,QAAQ,EACR,QAAQ,EACX,CAAA"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
3
|
-
declare const VerticalTabs:
|
|
4
|
-
declare const VerticalTabsList: React.ForwardRefExoticComponent<
|
|
5
|
-
declare const VerticalTabsTrigger: React.ForwardRefExoticComponent<
|
|
6
|
-
declare const VerticalTabsContent: React.ForwardRefExoticComponent<
|
|
3
|
+
declare const VerticalTabs: import("react").ForwardRefExoticComponent<TabsPrimitive.TabsProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const VerticalTabsList: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
|
|
5
|
+
declare const VerticalTabsTrigger: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
|
|
6
|
+
declare const VerticalTabsContent: React.ForwardRefExoticComponent<React.RefAttributes<never>>;
|
|
7
7
|
export { VerticalTabs, VerticalTabsList, VerticalTabsTrigger, VerticalTabsContent };
|
|
8
8
|
//# sourceMappingURL=vertical-tabs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vertical-tabs.d.ts","sourceRoot":"","sources":["../../../src/components/ui/vertical-tabs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD,QAAA,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"vertical-tabs.d.ts","sourceRoot":"","sources":["../../../src/components/ui/vertical-tabs.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,aAAa,MAAM,sBAAsB,CAAC;AAItD,QAAA,MAAM,YAAY,oHAAqB,CAAC;AAExC,QAAA,MAAM,gBAAgB,6DAYpB,CAAC;AAGH,QAAA,MAAM,mBAAmB,6DAYvB,CAAC;AAGH,QAAA,MAAM,mBAAmB,6DAYvB,CAAC;AAGH,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -12,9 +12,6 @@ export type HazoAuthUser = {
|
|
|
12
12
|
app_user_data: Record<string, unknown> | null;
|
|
13
13
|
legal_acceptance: LegalAcceptanceMap | null;
|
|
14
14
|
preferred_locale: string | null;
|
|
15
|
-
country: string | null;
|
|
16
|
-
state_province: string | null;
|
|
17
|
-
suburb: string | null;
|
|
18
15
|
};
|
|
19
16
|
/**
|
|
20
17
|
* Scope access information returned when scope checking is used
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth_types.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/auth_types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBA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,EAAO;CAKnD;AAED;;GAEG;AACH,qBAAa,uBAAwB,SAAQ,aAAa;aAEtC,QAAQ,EAAE,MAAM;aAChB,WAAW,EAAE,YAAY,EAAE;gBAD3B,QAAQ,EAAE,MAAM,EAChB,WAAW,GAAE,YAAY,EAAO;CAKnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hazo_get_auth.server.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/hazo_get_auth.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAGhB,MAAM,cAAc,CAAC;AAgEtB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAU1D;
|
|
1
|
+
{"version":3,"file":"hazo_get_auth.server.d.ts","sourceRoot":"","sources":["../../../src/lib/auth/hazo_get_auth.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAM1C,OAAO,KAAK,EACV,cAAc,EAEd,eAAe,EAGhB,MAAM,cAAc,CAAC;AAgEtB;;;;GAIG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,WAAW,GAAG,MAAM,CAU1D;AA6SD;;;;;;;;;GASG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,WAAW,EACpB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,cAAc,CAAC,CA+NzB"}
|
|
@@ -154,9 +154,6 @@ async function fetch_user_data_from_db(user_id) {
|
|
|
154
154
|
app_user_data: parse_app_user_data(user_db.app_user_data),
|
|
155
155
|
legal_acceptance: parse_legal_acceptance(user_db.legal_acceptance),
|
|
156
156
|
preferred_locale: user_db.preferred_locale || null,
|
|
157
|
-
country: user_db.country || null,
|
|
158
|
-
state_province: user_db.state_province || null,
|
|
159
|
-
suburb: user_db.suburb || null,
|
|
160
157
|
};
|
|
161
158
|
// v5.x: Fetch user's roles from hazo_user_scopes (scope-based role assignments)
|
|
162
159
|
// Each scope assignment has a role_id (string UUID)
|
|
@@ -1,14 +1,10 @@
|
|
|
1
1
|
import "server-only";
|
|
2
|
-
import { type LocationFieldsConfig } from "./location_fields_config.server.js";
|
|
3
2
|
export type MySettingsConfig = {
|
|
4
3
|
userFields: {
|
|
5
4
|
show_name_field: boolean;
|
|
6
5
|
show_email_field: boolean;
|
|
7
6
|
show_password_field: boolean;
|
|
8
7
|
};
|
|
9
|
-
/** Which indexed location fields to show as an editable "Location" card —
|
|
10
|
-
* see [hazo_auth__custom_fields] in hazo_auth_config.ini. */
|
|
11
|
-
locationFields: LocationFieldsConfig;
|
|
12
8
|
passwordRequirements: {
|
|
13
9
|
minimum_length: number;
|
|
14
10
|
require_uppercase: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"my_settings_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/my_settings_config.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"my_settings_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/my_settings_config.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAYrB,MAAM,MAAM,gBAAgB,GAAG;IAC7B,UAAU,EAAE;QACV,eAAe,EAAE,OAAO,CAAC;QACzB,gBAAgB,EAAE,OAAO,CAAC;QAC1B,mBAAmB,EAAE,OAAO,CAAC;KAC9B,CAAC;IACF,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,cAAc,EAAE;QACd,kBAAkB,EAAE,OAAO,CAAC;QAC5B,iBAAiB,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AA+B,EAAE,MAAM,CAAC;QACxC,4BAA4B,EAAE,MAAM,CAAC;KACtC,CAAC;IACF,SAAS,EAAE;QACT,wBAAwB,EAAE,MAAM,EAAE,CAAC;QACnC,wBAAwB,EAAE,MAAM,EAAE,CAAC;KACpC,CAAC;CACH,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,sBAAsB,IAAI,gBAAgB,CAkEzD"}
|
|
@@ -9,7 +9,6 @@ import { get_profile_picture_config } from "./profile_picture_config.server.js";
|
|
|
9
9
|
import { get_messages_config } from "./messages_config.server.js";
|
|
10
10
|
import { get_ui_sizes_config } from "./ui_sizes_config.server.js";
|
|
11
11
|
import { get_file_types_config } from "./file_types_config.server.js";
|
|
12
|
-
import { get_location_fields_config } from "./location_fields_config.server.js";
|
|
13
12
|
// section: helpers
|
|
14
13
|
/**
|
|
15
14
|
* Reads my settings layout configuration from hazo_auth_config.ini file
|
|
@@ -52,10 +51,8 @@ export function get_my_settings_config() {
|
|
|
52
51
|
const loginButtonLabel = get_config_value_optional(section, "login_button_label");
|
|
53
52
|
const loginPath = get_config_value(section, "login_path", "/hazo_auth/login");
|
|
54
53
|
const enableAccountDeletion = get_config_boolean(section, "enable_account_deletion", false);
|
|
55
|
-
const locationFields = get_location_fields_config();
|
|
56
54
|
return {
|
|
57
55
|
userFields,
|
|
58
|
-
locationFields,
|
|
59
56
|
passwordRequirements,
|
|
60
57
|
profilePicture,
|
|
61
58
|
heading,
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import "server-only";
|
|
2
|
-
import { type LocationFieldsConfig } from "./location_fields_config.server.js";
|
|
3
|
-
import { type AppUserDataSchema } from "./app_user_data_config.server.js";
|
|
4
2
|
export type RegisterConfig = {
|
|
5
3
|
showNameField: boolean;
|
|
6
4
|
passwordRequirements: {
|
|
@@ -30,14 +28,6 @@ export type RegisterConfig = {
|
|
|
30
28
|
enable_facebook_oauth: boolean;
|
|
31
29
|
facebook_button_text: string | undefined;
|
|
32
30
|
};
|
|
33
|
-
/** Which indexed location fields to render on the registration form — see
|
|
34
|
-
* [hazo_auth__custom_fields] in hazo_auth_config.ini. */
|
|
35
|
-
locationFields: LocationFieldsConfig;
|
|
36
|
-
/** Arbitrary custom fields to render on the registration form, reusing the
|
|
37
|
-
* EXISTING [hazo_auth__app_user_data] JSON Schema config (ticket 09 does NOT
|
|
38
|
-
* introduce a second, parallel custom-field config format). Null when
|
|
39
|
-
* schema-based app_user_data editing isn't enabled. */
|
|
40
|
-
customFieldsSchema: AppUserDataSchema | null;
|
|
41
31
|
};
|
|
42
32
|
/**
|
|
43
33
|
* 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":"AAEA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"register_config.server.d.ts","sourceRoot":"","sources":["../../src/lib/register_config.server.ts"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAoBrB,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,GAAG,SAAS,CAAC;IAC3C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,qBAAqB,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1C,cAAc,EAAE,MAAM,CAAC;IACvB,UAAU,EAAE,MAAM,CAAC;IACnB,kGAAkG;IAClG,WAAW,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,0BAA0B;IAC1B,KAAK,EAAE;QACL,aAAa,EAAE,OAAO,CAAC;QACvB,qBAAqB,EAAE,OAAO,CAAC;QAC/B,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;QACvC,kBAAkB,EAAE,MAAM,GAAG,SAAS,CAAC;QACvC,qBAAqB,EAAE,OAAO,CAAC;QAC/B,oBAAoB,EAAE,MAAM,GAAG,SAAS,CAAC;KAC1C,CAAC;CACH,CAAC;AAGF;;;;GAIG;AACH,wBAAgB,mBAAmB,IAAI,cAAc,CA+EpD"}
|
|
@@ -7,8 +7,6 @@ import { get_password_requirements_config } from "./password_requirements_config
|
|
|
7
7
|
import { get_already_logged_in_config } from "./already_logged_in_config.server.js";
|
|
8
8
|
import { get_user_fields_config } from "./user_fields_config.server.js";
|
|
9
9
|
import { get_oauth_config } from "./oauth_config.server.js";
|
|
10
|
-
import { get_location_fields_config } from "./location_fields_config.server.js";
|
|
11
|
-
import { get_app_user_data_schema } from "./app_user_data_config.server.js";
|
|
12
10
|
// Default image path - consuming apps should either:
|
|
13
11
|
// 1. Configure their own image_src in hazo_auth_config.ini
|
|
14
12
|
// 2. Copy the default images from node_modules/hazo_auth/public/hazo_auth/images/ to their public folder
|
|
@@ -44,9 +42,6 @@ export function get_register_config() {
|
|
|
44
42
|
const imageBackgroundColor = get_config_value("hazo_auth__register_layout", "image_background_color", "#e2e8f0");
|
|
45
43
|
// Get OAuth configuration (shared with login)
|
|
46
44
|
const oauthConfig = get_oauth_config();
|
|
47
|
-
// Location + arbitrary custom fields (ticket 09)
|
|
48
|
-
const locationFields = get_location_fields_config();
|
|
49
|
-
const customFieldsSchema = get_app_user_data_schema();
|
|
50
45
|
// For the register page, the Google button text is undefined unless the
|
|
51
46
|
// consumer explicitly overrides it — RegisterLayout falls back to
|
|
52
47
|
// `t("register.oauth.google_button_default")` ("Sign up with Google").
|
|
@@ -72,7 +67,5 @@ export function get_register_config() {
|
|
|
72
67
|
enable_facebook_oauth: oauthConfig.enable_facebook_oauth,
|
|
73
68
|
facebook_button_text: oauthConfig.facebook_button_text,
|
|
74
69
|
},
|
|
75
|
-
locationFields,
|
|
76
|
-
customFieldsSchema,
|
|
77
70
|
};
|
|
78
71
|
}
|
|
@@ -18,6 +18,17 @@ export type RegistrationData = {
|
|
|
18
18
|
* existing `app_user_data` JSONB column via `update_app_user_data()` — no new
|
|
19
19
|
* column or config parser for these; see register_config.server.ts. */
|
|
20
20
|
custom_fields?: Record<string, unknown>;
|
|
21
|
+
/**
|
|
22
|
+
* Explicit user type for this registration (e.g. a consumer with separate
|
|
23
|
+
* `/register/parent` and `/register/teacher` entry points, each setting a
|
|
24
|
+
* different type). Only takes effect when `[hazo_auth__user_types]`'s
|
|
25
|
+
* `enable_user_types` is on, and must match a configured `user_type_N` key
|
|
26
|
+
* — an unknown key fails the registration with `error: "Invalid user
|
|
27
|
+
* type"` rather than silently falling back to the config default.
|
|
28
|
+
* Omitted = fall back to `[hazo_auth__user_types].default_user_type`, same
|
|
29
|
+
* as before this field existed.
|
|
30
|
+
*/
|
|
31
|
+
user_type?: string;
|
|
21
32
|
};
|
|
22
33
|
export type RegistrationResult = {
|
|
23
34
|
success: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"registration_service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/registration_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"registration_service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/registration_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAmBvD,OAAO,EAAyB,KAAK,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAI3F,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAClD,EAAE,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B;;gFAE4E;IAC5E,QAAQ,CAAC,EAAE,mBAAmB,CAAC;IAC/B;;4EAEwE;IACxE,aAAa,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACxC;;;;;;;;;OASG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG;IAC/B,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF;;;;;GAKG;AACH,wBAAsB,aAAa,CACjC,OAAO,EAAE,kBAAkB,EAC3B,IAAI,EAAE,gBAAgB,GACrB,OAAO,CAAC,kBAAkB,CAAC,CAkM7B"}
|
|
@@ -12,8 +12,6 @@ import { get_line_number } from "../utils/api_route_helpers.js";
|
|
|
12
12
|
import { is_user_types_enabled, get_default_user_type, } from "../user_types_config.server.js";
|
|
13
13
|
import { write_legal_acceptance } from "../legal/legal_docs_service.js";
|
|
14
14
|
import { fire_auth_hook } from "../auth_hooks.js";
|
|
15
|
-
import { build_location_fields } from "./location_fields_helper.js";
|
|
16
|
-
import { update_app_user_data } from "./app_user_data_service.js";
|
|
17
15
|
// section: helpers
|
|
18
16
|
/**
|
|
19
17
|
* Registers a new user in the database using hazo_connect
|
|
@@ -65,9 +63,6 @@ export async function register_user(adapter, data) {
|
|
|
65
63
|
insert_data.url_on_logon = url_on_logon;
|
|
66
64
|
}
|
|
67
65
|
}
|
|
68
|
-
// Indexed location columns (country / state_province / suburb) — additive,
|
|
69
|
-
// no-op when `data.location` is omitted (every pre-ticket-09 caller).
|
|
70
|
-
Object.assign(insert_data, build_location_fields(data.location));
|
|
71
66
|
// Set default profile picture if enabled
|
|
72
67
|
const profile_picture_config = get_profile_picture_config();
|
|
73
68
|
if (profile_picture_config.user_photo_default) {
|
|
@@ -93,12 +88,6 @@ export async function register_user(adapter, data) {
|
|
|
93
88
|
error: "Failed to create user account",
|
|
94
89
|
};
|
|
95
90
|
}
|
|
96
|
-
// Arbitrary custom fields (JSON Schema-driven, [hazo_auth__app_user_data]) —
|
|
97
|
-
// merge mode is a no-op concern here (brand new user, nothing to merge over),
|
|
98
|
-
// kept consistent with update_app_user_data()'s only mode of operation elsewhere.
|
|
99
|
-
if (data.custom_fields && Object.keys(data.custom_fields).length > 0) {
|
|
100
|
-
await update_app_user_data(adapter, user_id, data.custom_fields, { merge: true });
|
|
101
|
-
}
|
|
102
91
|
void fire_auth_hook("on_user_created", {
|
|
103
92
|
user_id,
|
|
104
93
|
email,
|
|
@@ -1,16 +1,11 @@
|
|
|
1
1
|
import type { HazoConnectAdapter } from "hazo_connect";
|
|
2
2
|
import { type ProfilePictureSourceUI } from "./profile_picture_source_mapper.js";
|
|
3
|
-
import { type LocationFieldsInput } from "./location_fields_helper.js";
|
|
4
3
|
export type UserUpdateData = {
|
|
5
4
|
name?: string;
|
|
6
5
|
email?: string;
|
|
7
6
|
profile_picture_url?: string;
|
|
8
7
|
profile_source?: ProfilePictureSourceUI;
|
|
9
8
|
preferred_locale?: string | null;
|
|
10
|
-
/** Indexed location columns (My Settings' "Location" card). Only non-blank,
|
|
11
|
-
* provided fields are persisted — omitted or blank fields are left unchanged
|
|
12
|
-
* (see build_location_fields; it has no "clear" semantics). */
|
|
13
|
-
location?: LocationFieldsInput;
|
|
14
9
|
};
|
|
15
10
|
export type UserUpdateResult = {
|
|
16
11
|
success: boolean;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_update_service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/user_update_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"user_update_service.d.ts","sourceRoot":"","sources":["../../../src/lib/services/user_update_service.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAEvD,OAAO,EAAuB,KAAK,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AAMnG,MAAM,MAAM,cAAc,GAAG;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,cAAc,CAAC,EAAE,sBAAsB,CAAC;IAIxC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,OAAO,EAAE,OAAO,CAAC;IACjB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AAGF;;;;;;;GAOG;AACH,wBAAsB,mBAAmB,CACvC,OAAO,EAAE,kBAAkB,EAC3B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,gBAAgB,CAAC,CA4G3B"}
|
|
@@ -3,7 +3,6 @@ import { map_ui_source_to_db } from "./profile_picture_source_mapper.js";
|
|
|
3
3
|
import { create_app_logger } from "../app_logger.js";
|
|
4
4
|
import { sanitize_error_for_user } from "../utils/error_sanitizer.js";
|
|
5
5
|
import { get_line_number } from "../utils/api_route_helpers.js";
|
|
6
|
-
import { build_location_fields } from "./location_fields_helper.js";
|
|
7
6
|
// section: helpers
|
|
8
7
|
/**
|
|
9
8
|
* Updates user profile information (name, email)
|
|
@@ -76,7 +75,6 @@ export async function update_user_profile(adapter, user_id, data) {
|
|
|
76
75
|
// null explicitly clears the preference (falls back to detection elsewhere)
|
|
77
76
|
update_data.preferred_locale = data.preferred_locale;
|
|
78
77
|
}
|
|
79
|
-
Object.assign(update_data, build_location_fields(data.location));
|
|
80
78
|
// If email changed, set email_verified to false
|
|
81
79
|
if (email_changed) {
|
|
82
80
|
update_data.email_verified = false;
|
package/dist/locales/en.json
CHANGED
|
@@ -162,9 +162,6 @@
|
|
|
162
162
|
"register.field.name.label": "Full name",
|
|
163
163
|
"register.field.name.placeholder": "Enter your full name",
|
|
164
164
|
"register.field.name.aria_label": "Full name input field",
|
|
165
|
-
"register.field.location_country.label": "Country",
|
|
166
|
-
"register.field.location_state_province.label": "State / Province",
|
|
167
|
-
"register.field.location_suburb.label": "Suburb",
|
|
168
165
|
"register.field.password.label": "Password",
|
|
169
166
|
"register.field.password.placeholder": "Enter your password",
|
|
170
167
|
"register.field.password.aria_label": "Password input field",
|
|
@@ -594,7 +591,6 @@
|
|
|
594
591
|
"app_user_data.clear_dialog.confirming": "Clearing...",
|
|
595
592
|
"user_management.signup_stats.vs_previous": "vs. previous equal period",
|
|
596
593
|
"user_management.signup_stats.prev_count": "prev {{count}}",
|
|
597
|
-
"user_management.signup_stats.prev_template": "prev {count}",
|
|
598
594
|
"user_management.signup_stats.total_users": "total users",
|
|
599
595
|
"user_management.signup_stats.ytd_title": "Signups by month (YTD)",
|
|
600
596
|
"user_management.signup_stats.ytd_aria": "Year-to-date signups by month: {{list}}",
|
|
@@ -612,12 +608,6 @@
|
|
|
612
608
|
"my_settings.toast.password_error": "Failed to change password",
|
|
613
609
|
"my_settings.toast.profile_picture_success": "Profile picture updated successfully",
|
|
614
610
|
"my_settings.toast.profile_picture_error": "Failed to update profile picture",
|
|
615
|
-
"my_settings.toast.location_success": "Location updated successfully",
|
|
616
|
-
"my_settings.toast.location_error": "Failed to update location",
|
|
617
|
-
"my_settings.location_label_default": "Location",
|
|
618
|
-
"my_settings.location.country_label": "Country",
|
|
619
|
-
"my_settings.location.state_province_label": "State / Province",
|
|
620
|
-
"my_settings.location.suburb_label": "Suburb",
|
|
621
611
|
"my_settings.toast.profile_picture_removed": "Profile picture removed successfully",
|
|
622
612
|
"my_settings.toast.profile_picture_remove_error": "Failed to remove profile picture",
|
|
623
613
|
"user_management.table.photo": "Photo",
|
|
@@ -21,14 +21,6 @@ export type MySettingsPageProps = {
|
|
|
21
21
|
show_email_field?: boolean;
|
|
22
22
|
show_password_field?: boolean;
|
|
23
23
|
};
|
|
24
|
-
/** Which indexed location fields to show as an editable "Location" card.
|
|
25
|
-
* All default to false — this manual-config entry point has no INI file to
|
|
26
|
-
* read, unlike the zero-config `server_pages/my_settings.tsx`. */
|
|
27
|
-
locationFields?: {
|
|
28
|
-
country?: boolean;
|
|
29
|
-
state_province?: boolean;
|
|
30
|
-
suburb?: boolean;
|
|
31
|
-
};
|
|
32
24
|
passwordRequirements?: Partial<PasswordRequirementOptions>;
|
|
33
25
|
profilePicture?: {
|
|
34
26
|
allow_photo_upload?: boolean;
|
|
@@ -72,6 +64,6 @@ export type MySettingsPageProps = {
|
|
|
72
64
|
* @param props - Optional configuration overrides
|
|
73
65
|
* @returns My settings page component
|
|
74
66
|
*/
|
|
75
|
-
export declare function MySettingsPage({ userFields,
|
|
67
|
+
export declare function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading: headingProp, subHeading: subHeadingProp, profilePhotoLabel: profilePhotoLabelProp, profilePhotoRecommendation, uploadPhotoButtonLabel: uploadPhotoButtonLabelProp, removePhotoButtonLabel: removePhotoButtonLabelProp, profileInformationLabel: profileInformationLabelProp, passwordLabel: passwordLabelProp, currentPasswordLabel: currentPasswordLabelProp, newPasswordLabel: newPasswordLabelProp, confirmPasswordLabel: confirmPasswordLabelProp, savePasswordButtonLabel, unauthorizedMessage: unauthorizedMessageProp, loginButtonLabel: loginButtonLabelProp, loginPath, enableAccountDeletion, messages, uiSizes, fileTypes, }?: MySettingsPageProps): import("react").JSX.Element;
|
|
76
68
|
export default MySettingsPage;
|
|
77
69
|
//# sourceMappingURL=my_settings.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/page_components/my_settings.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;
|
|
1
|
+
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/page_components/my_settings.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0DAA0D,CAAC;AA4B3G,QAAA,MAAM,gBAAgB;;;;;CAKrB,CAAC;AAEF,QAAA,MAAM,gBAAgB;;;;;;;;;CASrB,CAAC;AAQF,MAAM,MAAM,mBAAmB,GAAG;IAChC,UAAU,CAAC,EAAE;QACX,eAAe,CAAC,EAAE,OAAO,CAAC;QAC1B,gBAAgB,CAAC,EAAE,OAAO,CAAC;QAC3B,mBAAmB,CAAC,EAAE,OAAO,CAAC;KAC/B,CAAC;IACF,oBAAoB,CAAC,EAAE,OAAO,CAAC,0BAA0B,CAAC,CAAC;IAC3D,cAAc,CAAC,EAAE;QACf,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B,cAAc,CAAC,EAAE,MAAM,CAAC;QACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;QAC7B,4BAA4B,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;QACtD,4BAA4B,CAAC,EAAE,SAAS,GAAG,UAAU,CAAC;QACtD,kBAAkB,CAAC,EAAE,MAAM,CAAC;KAC7B,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IAC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R,OAAO,EACP,SAAS,GACV,GAAE,mBAAwB,+BAyE1B;AAED,eAAe,cAAc,CAAC"}
|
|
@@ -11,11 +11,6 @@ const DEFAULT_USER_FIELDS = {
|
|
|
11
11
|
show_email_field: true,
|
|
12
12
|
show_password_field: true,
|
|
13
13
|
};
|
|
14
|
-
const DEFAULT_LOCATION_FIELDS = {
|
|
15
|
-
country: false,
|
|
16
|
-
state_province: false,
|
|
17
|
-
suburb: false,
|
|
18
|
-
};
|
|
19
14
|
const DEFAULT_PASSWORD_REQUIREMENTS = {
|
|
20
15
|
minimum_length: 8,
|
|
21
16
|
require_uppercase: true,
|
|
@@ -59,7 +54,7 @@ const DEFAULT_FILE_TYPES = {
|
|
|
59
54
|
* @param props - Optional configuration overrides
|
|
60
55
|
* @returns My settings page component
|
|
61
56
|
*/
|
|
62
|
-
export function MySettingsPage({ userFields,
|
|
57
|
+
export function MySettingsPage({ userFields, passwordRequirements, profilePicture, heading: headingProp, subHeading: subHeadingProp, profilePhotoLabel: profilePhotoLabelProp, profilePhotoRecommendation = "Recommended: Square image, at least 200x200 pixels", uploadPhotoButtonLabel: uploadPhotoButtonLabelProp, removePhotoButtonLabel: removePhotoButtonLabelProp, profileInformationLabel: profileInformationLabelProp, passwordLabel: passwordLabelProp, currentPasswordLabel: currentPasswordLabelProp, newPasswordLabel: newPasswordLabelProp, confirmPasswordLabel: confirmPasswordLabelProp, savePasswordButtonLabel = "Update Password", unauthorizedMessage: unauthorizedMessageProp, loginButtonLabel: loginButtonLabelProp, loginPath = "/hazo_auth/login", enableAccountDeletion = false, messages, uiSizes, fileTypes, } = {}) {
|
|
63
58
|
const t = useAuthT();
|
|
64
59
|
const heading = headingProp !== null && headingProp !== void 0 ? headingProp : t("my_settings.page_title");
|
|
65
60
|
const subHeading = subHeadingProp !== null && subHeadingProp !== void 0 ? subHeadingProp : t("my_settings.sub_heading_default");
|
|
@@ -75,13 +70,12 @@ export function MySettingsPage({ userFields, locationFields, passwordRequirement
|
|
|
75
70
|
const loginButtonLabel = loginButtonLabelProp !== null && loginButtonLabelProp !== void 0 ? loginButtonLabelProp : t("shared.guard.login_button_default");
|
|
76
71
|
// Merge provided props with defaults
|
|
77
72
|
const mergedUserFields = Object.assign(Object.assign({}, DEFAULT_USER_FIELDS), userFields);
|
|
78
|
-
const mergedLocationFields = Object.assign(Object.assign({}, DEFAULT_LOCATION_FIELDS), locationFields);
|
|
79
73
|
const mergedPasswordRequirements = Object.assign(Object.assign({}, DEFAULT_PASSWORD_REQUIREMENTS), passwordRequirements);
|
|
80
74
|
const mergedProfilePicture = Object.assign(Object.assign({}, DEFAULT_PROFILE_PICTURE), profilePicture);
|
|
81
75
|
const mergedMessages = Object.assign(Object.assign({}, DEFAULT_MESSAGES), messages);
|
|
82
76
|
const mergedUiSizes = Object.assign(Object.assign({}, DEFAULT_UI_SIZES), uiSizes);
|
|
83
77
|
const mergedFileTypes = Object.assign(Object.assign({}, DEFAULT_FILE_TYPES), fileTypes);
|
|
84
78
|
const MySettingsLayout = my_settings_layout;
|
|
85
|
-
return (_jsx(MySettingsLayout, { userFields: mergedUserFields,
|
|
79
|
+
return (_jsx(MySettingsLayout, { userFields: mergedUserFields, password_requirements: mergedPasswordRequirements, profilePicture: mergedProfilePicture, heading: heading, subHeading: subHeading, profilePhotoLabel: profilePhotoLabel, profilePhotoRecommendation: profilePhotoRecommendation, uploadPhotoButtonLabel: uploadPhotoButtonLabel, removePhotoButtonLabel: removePhotoButtonLabel, profileInformationLabel: profileInformationLabel, passwordLabel: passwordLabel, currentPasswordLabel: currentPasswordLabel, newPasswordLabel: newPasswordLabel, confirmPasswordLabel: confirmPasswordLabel, unauthorizedMessage: unauthorizedMessage, loginButtonLabel: loginButtonLabel, loginPath: loginPath, enableAccountDeletion: enableAccountDeletion, messages: mergedMessages, uiSizes: mergedUiSizes, fileTypes: mergedFileTypes }));
|
|
86
80
|
}
|
|
87
81
|
export default MySettingsPage;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../../../src/server/routes/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoBxD;;;;;GAKG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW;;
|
|
1
|
+
{"version":3,"file":"me.d.ts","sourceRoot":"","sources":["../../../src/server/routes/me.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAoBxD;;;;;GAKG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW;;IAmH7C"}
|
package/dist/server/routes/me.js
CHANGED
|
@@ -24,7 +24,7 @@ function strip_sentinel_email(email) {
|
|
|
24
24
|
* Always returns the same format to prevent downstream variations.
|
|
25
25
|
*/
|
|
26
26
|
export async function GET(request) {
|
|
27
|
-
var _a, _b
|
|
27
|
+
var _a, _b;
|
|
28
28
|
const logger = create_app_logger();
|
|
29
29
|
try {
|
|
30
30
|
// Use hazo_get_auth to get user with permissions
|
|
@@ -99,10 +99,6 @@ export async function GET(request) {
|
|
|
99
99
|
legal_acceptance: (_a = auth_result.user.legal_acceptance) !== null && _a !== void 0 ? _a : null,
|
|
100
100
|
// User's explicit locale preference (BCP 47 tag), or null if unset
|
|
101
101
|
preferred_locale: (_b = auth_result.user.preferred_locale) !== null && _b !== void 0 ? _b : null,
|
|
102
|
-
// Indexed location fields (null unless enabled + set — see location_fields_config.server.ts)
|
|
103
|
-
country: (_c = auth_result.user.country) !== null && _c !== void 0 ? _c : null,
|
|
104
|
-
state_province: (_d = auth_result.user.state_province) !== null && _d !== void 0 ? _d : null,
|
|
105
|
-
suburb: (_e = auth_result.user.suburb) !== null && _e !== void 0 ? _e : null,
|
|
106
102
|
// Permissions and user object (always included)
|
|
107
103
|
user: auth_result.user,
|
|
108
104
|
permissions: auth_result.permissions,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/server/routes/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiDxD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW;;;;;;
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../../src/server/routes/register.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAiDxD,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW;;;;;;IA0I9C"}
|
|
@@ -9,48 +9,6 @@ import { sanitize_error_for_user } from "../../lib/utils/error_sanitizer.js";
|
|
|
9
9
|
import { get_legal_docs_config } from "../../lib/legal/legal_docs_config.server.js";
|
|
10
10
|
import { read_legal_doc } from "../../lib/legal/legal_docs_reader.server.js";
|
|
11
11
|
import { get_client_ip } from "../../lib/auth/hazo_get_auth.server.js";
|
|
12
|
-
import { get_location_fields_config } from "../../lib/location_fields_config.server.js";
|
|
13
|
-
import { get_app_user_data_schema } from "../../lib/app_user_data_config.server.js";
|
|
14
|
-
// section: helpers
|
|
15
|
-
/**
|
|
16
|
-
* Keeps only the location fields the app has actually enabled via
|
|
17
|
-
* `[hazo_auth__custom_fields]` — never trust the client-side field visibility
|
|
18
|
-
* alone (same rationale as every other server-side re-validation in this file).
|
|
19
|
-
*/
|
|
20
|
-
function pick_enabled_location_fields(raw) {
|
|
21
|
-
if (!raw || typeof raw !== "object")
|
|
22
|
-
return undefined;
|
|
23
|
-
const enabled = get_location_fields_config();
|
|
24
|
-
const result = {};
|
|
25
|
-
const source = raw;
|
|
26
|
-
if (enabled.country && typeof source.country === "string")
|
|
27
|
-
result.country = source.country;
|
|
28
|
-
if (enabled.state_province && typeof source.state_province === "string")
|
|
29
|
-
result.state_province = source.state_province;
|
|
30
|
-
if (enabled.suburb && typeof source.suburb === "string")
|
|
31
|
-
result.suburb = source.suburb;
|
|
32
|
-
return Object.keys(result).length > 0 ? result : undefined;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Keeps only the custom field keys present in the configured app_user_data
|
|
36
|
-
* JSON Schema — a consumer can't stuff arbitrary keys into app_user_data at
|
|
37
|
-
* signup just because the request body included them.
|
|
38
|
-
*/
|
|
39
|
-
function pick_schema_custom_fields(raw) {
|
|
40
|
-
if (!raw || typeof raw !== "object")
|
|
41
|
-
return undefined;
|
|
42
|
-
const schema = get_app_user_data_schema();
|
|
43
|
-
if (!schema)
|
|
44
|
-
return undefined;
|
|
45
|
-
const allowed_keys = Object.keys(schema.properties);
|
|
46
|
-
const source = raw;
|
|
47
|
-
const result = {};
|
|
48
|
-
for (const key of allowed_keys) {
|
|
49
|
-
if (key in source)
|
|
50
|
-
result[key] = source[key];
|
|
51
|
-
}
|
|
52
|
-
return Object.keys(result).length > 0 ? result : undefined;
|
|
53
|
-
}
|
|
54
12
|
// section: api_handler
|
|
55
13
|
export async function POST(request) {
|
|
56
14
|
var _a;
|
|
@@ -59,8 +17,6 @@ export async function POST(request) {
|
|
|
59
17
|
const body = await request.json();
|
|
60
18
|
const { name, email, password, url_on_logon } = body;
|
|
61
19
|
const legal_accepted = body === null || body === void 0 ? void 0 : body.legal_accepted;
|
|
62
|
-
const location = pick_enabled_location_fields(body === null || body === void 0 ? void 0 : body.location);
|
|
63
|
-
const custom_fields = pick_schema_custom_fields(body === null || body === void 0 ? void 0 : body.custom_fields);
|
|
64
20
|
// Validate input
|
|
65
21
|
if (!email || !password) {
|
|
66
22
|
logger.warn("registration_validation_failed", {
|
|
@@ -110,8 +66,6 @@ export async function POST(request) {
|
|
|
110
66
|
legal_accepted,
|
|
111
67
|
ip: get_client_ip(request),
|
|
112
68
|
user_agent: request.headers.get('user-agent'),
|
|
113
|
-
location,
|
|
114
|
-
custom_fields,
|
|
115
69
|
});
|
|
116
70
|
if (!result.success) {
|
|
117
71
|
const status_code = result.error === "Email address already registered" ? 409 : 500;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update_user.d.ts","sourceRoot":"","sources":["../../../src/server/routes/update_user.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"update_user.d.ts","sourceRoot":"","sources":["../../../src/server/routes/update_user.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AA0BxD,wBAAsB,KAAK,CAAC,OAAO,EAAE,WAAW;;;;;;IAyI/C"}
|
|
@@ -7,26 +7,6 @@ import { update_user_profile } from "../../lib/services/user_update_service.js";
|
|
|
7
7
|
import { get_filename, get_line_number } from "../../lib/utils/api_route_helpers.js";
|
|
8
8
|
import { require_auth } from "../../lib/auth/auth_utils.server.js";
|
|
9
9
|
import { get_cookie_name, get_cookie_options, BASE_COOKIE_NAMES } from "../../lib/cookies_config.server.js";
|
|
10
|
-
import { get_location_fields_config } from "../../lib/location_fields_config.server.js";
|
|
11
|
-
// section: helpers
|
|
12
|
-
/**
|
|
13
|
-
* Keeps only the location fields the app has enabled via
|
|
14
|
-
* `[hazo_auth__custom_fields]` — same re-validation as the register route.
|
|
15
|
-
*/
|
|
16
|
-
function pick_enabled_location_fields(raw) {
|
|
17
|
-
if (!raw || typeof raw !== "object")
|
|
18
|
-
return undefined;
|
|
19
|
-
const enabled = get_location_fields_config();
|
|
20
|
-
const result = {};
|
|
21
|
-
const source = raw;
|
|
22
|
-
if (enabled.country && typeof source.country === "string")
|
|
23
|
-
result.country = source.country;
|
|
24
|
-
if (enabled.state_province && typeof source.state_province === "string")
|
|
25
|
-
result.state_province = source.state_province;
|
|
26
|
-
if (enabled.suburb && typeof source.suburb === "string")
|
|
27
|
-
result.suburb = source.suburb;
|
|
28
|
-
return Object.keys(result).length > 0 ? result : undefined;
|
|
29
|
-
}
|
|
30
10
|
// section: constants
|
|
31
11
|
// BCP 47 language tag, optionally followed by a region/script subtag
|
|
32
12
|
// (e.g. "en", "en-US", "pt-BR", "zh-Hans"). Deliberately NOT an allowlist — any
|
|
@@ -66,13 +46,11 @@ export async function PATCH(request) {
|
|
|
66
46
|
}
|
|
67
47
|
const body = await request.json();
|
|
68
48
|
const { name, email, profile_picture_url, profile_source, preferred_locale } = body;
|
|
69
|
-
const location = pick_enabled_location_fields(body === null || body === void 0 ? void 0 : body.location);
|
|
70
49
|
// Validate input (at least one field must be provided)
|
|
71
50
|
if (name === undefined &&
|
|
72
51
|
email === undefined &&
|
|
73
52
|
profile_picture_url === undefined &&
|
|
74
|
-
preferred_locale === undefined
|
|
75
|
-
location === undefined) {
|
|
53
|
+
preferred_locale === undefined) {
|
|
76
54
|
logger.warn("user_update_validation_failed", {
|
|
77
55
|
filename: get_filename(),
|
|
78
56
|
line_number: get_line_number(),
|
|
@@ -99,7 +77,6 @@ export async function PATCH(request) {
|
|
|
99
77
|
profile_picture_url,
|
|
100
78
|
profile_source,
|
|
101
79
|
preferred_locale,
|
|
102
|
-
location,
|
|
103
80
|
});
|
|
104
81
|
if (!result.success) {
|
|
105
82
|
logger.warn("user_update_failed", {
|
|
@@ -26,7 +26,7 @@ export declare function GET(request: NextRequest): Promise<NextResponse<{
|
|
|
26
26
|
profile_source: {} | null;
|
|
27
27
|
user_type: string | null;
|
|
28
28
|
app_user_data: Record<string, unknown> | null;
|
|
29
|
-
legal_acceptance_status: "current" | "
|
|
29
|
+
legal_acceptance_status: "current" | "outdated" | "none";
|
|
30
30
|
}[];
|
|
31
31
|
}>>;
|
|
32
32
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/server_pages/my_settings.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAQrB,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,GACV,GAAE,mBAAwB,+
|
|
1
|
+
{"version":3,"file":"my_settings.d.ts","sourceRoot":"","sources":["../../src/server_pages/my_settings.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAQrB,MAAM,MAAM,mBAAmB,GAAG;IAChC;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,CAAC,OAAO,UAAU,cAAc,CAAC,EACrC,SAAS,GACV,GAAE,mBAAwB,+BAiC1B;AAGD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -56,7 +56,7 @@ export default function MySettingsPage({ className, } = {}) {
|
|
|
56
56
|
// Load configuration from INI file (with defaults)
|
|
57
57
|
const config = get_my_settings_config();
|
|
58
58
|
// Render layout with all server-initialized configuration, wrapped in AuthPageShell for navbar support
|
|
59
|
-
return (_jsx(AuthPageShell, { children: _jsx(MySettingsLayout, { className: className, password_requirements: config.passwordRequirements, profilePicture: config.profilePicture, userFields: config.userFields,
|
|
59
|
+
return (_jsx(AuthPageShell, { children: _jsx(MySettingsLayout, { className: className, password_requirements: config.passwordRequirements, profilePicture: config.profilePicture, userFields: config.userFields, unauthorizedMessage: config.unauthorizedMessage, loginButtonLabel: config.loginButtonLabel, loginPath: config.loginPath, enableAccountDeletion: config.enableAccountDeletion, heading: config.heading, subHeading: config.subHeading, profilePhotoLabel: config.profilePhotoLabel, profilePhotoRecommendation: config.profilePhotoRecommendation, uploadPhotoButtonLabel: config.uploadPhotoButtonLabel, removePhotoButtonLabel: config.removePhotoButtonLabel, profileInformationLabel: config.profileInformationLabel, passwordLabel: config.passwordLabel, currentPasswordLabel: config.currentPasswordLabel, newPasswordLabel: config.newPasswordLabel, confirmPasswordLabel: config.confirmPasswordLabel, messages: config.messages, uiSizes: config.uiSizes, fileTypes: config.fileTypes }) }));
|
|
60
60
|
}
|
|
61
61
|
// Named export for direct imports
|
|
62
62
|
export { MySettingsPage };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/server_pages/register.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IAEpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,MAAqB,EACrB,aAAqB,GACtB,GAAE,iBAAsB,+
|
|
1
|
+
{"version":3,"file":"register.d.ts","sourceRoot":"","sources":["../../src/server_pages/register.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,iBAAiB,GAAG;IAC9B;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IAErC;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAEhC;;;;OAIG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IAEpC;;;;;OAKG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB,CAAC;AAIF;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,MAAqB,EACrB,aAAqB,GACtB,GAAE,iBAAsB,+BA4DxB;AAGD,OAAO,EAAE,YAAY,EAAE,CAAC"}
|
|
@@ -45,7 +45,7 @@ export default function RegisterPage({ image_src, image_alt, image_background_co
|
|
|
45
45
|
const finalImageSrc = image_src || config.imageSrc;
|
|
46
46
|
const finalImageAlt = image_alt || config.imageAlt;
|
|
47
47
|
const finalImageBackgroundColor = image_background_color || config.imageBackgroundColor;
|
|
48
|
-
const wrapper = (_jsx(RegisterClientWrapper, { image_src: finalImageSrc, image_alt: finalImageAlt, image_background_color: finalImageBackgroundColor, showNameField: config.showNameField, passwordRequirements: config.passwordRequirements, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath, signInPath: config.signInPath, signInLabel: config.signInLabel,
|
|
48
|
+
const wrapper = (_jsx(RegisterClientWrapper, { image_src: finalImageSrc, image_alt: finalImageAlt, image_background_color: finalImageBackgroundColor, showNameField: config.showNameField, passwordRequirements: config.passwordRequirements, alreadyLoggedInMessage: config.alreadyLoggedInMessage, showLogoutButton: config.showLogoutButton, showReturnHomeButton: config.showReturnHomeButton, returnHomeButtonLabel: config.returnHomeButtonLabel, returnHomePath: config.returnHomePath, signInPath: config.signInPath, signInLabel: config.signInLabel, oauth: {
|
|
49
49
|
enable_google: config.oauth.enable_google,
|
|
50
50
|
enable_email_password: config.oauth.enable_email_password,
|
|
51
51
|
google_button_text: config.oauth.google_button_text,
|