hazo_auth 5.1.2 → 5.1.4
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 +1 -1
- package/cli-src/lib/auth/auth_utils.server.ts +6 -6
- package/cli-src/lib/auth/hazo_get_auth.server.ts +3 -3
- package/cli-src/lib/auth/server_auth.ts +3 -3
- package/cli-src/lib/config/default_config.ts +4 -2
- package/cli-src/lib/services/login_service.ts +2 -2
- package/cli-src/lib/services/oauth_service.ts +1 -1
- package/cli-src/lib/services/registration_service.ts +1 -1
- package/dist/components/layouts/shared/components/auth_navbar.js +1 -1
- package/dist/components/layouts/shared/components/standalone_layout_wrapper.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/standalone_layout_wrapper.js +1 -1
- package/dist/components/layouts/shared/components/two_column_auth_layout.js +1 -1
- package/dist/lib/auth/auth_utils.server.js +6 -6
- package/dist/lib/auth/hazo_get_auth.server.js +3 -3
- package/dist/lib/auth/server_auth.js +3 -3
- package/dist/lib/config/default_config.d.ts +8 -4
- package/dist/lib/config/default_config.d.ts.map +1 -1
- package/dist/lib/config/default_config.js +4 -2
- package/dist/lib/services/login_service.js +2 -2
- package/dist/lib/services/oauth_service.js +1 -1
- package/dist/lib/services/registration_service.js +1 -1
- package/dist/server/routes/user_management_users.d.ts +1 -1
- package/dist/server/routes/user_management_users.js +3 -3
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ export type HazoAuthUser = {
|
|
|
8
8
|
id: string;
|
|
9
9
|
name: string | null;
|
|
10
10
|
email_address: string;
|
|
11
|
-
is_active: boolean; // Derived from status column: status === '
|
|
11
|
+
is_active: boolean; // Derived from status column: status === 'ACTIVE'
|
|
12
12
|
profile_picture_url: string | null;
|
|
13
13
|
// App-specific user data (JSON object stored as TEXT in database)
|
|
14
14
|
app_user_data: Record<string, unknown> | null;
|
|
@@ -69,8 +69,8 @@ export async function get_authenticated_user(request: NextRequest): Promise<Auth
|
|
|
69
69
|
|
|
70
70
|
const user = users[0];
|
|
71
71
|
|
|
72
|
-
// Check if user is active (status must be '
|
|
73
|
-
if (user.status !== "
|
|
72
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
73
|
+
if (user.status !== "ACTIVE") {
|
|
74
74
|
return { authenticated: false };
|
|
75
75
|
}
|
|
76
76
|
|
|
@@ -84,7 +84,7 @@ export async function get_authenticated_user(request: NextRequest): Promise<Auth
|
|
|
84
84
|
email: user.email_address as string,
|
|
85
85
|
name: (user.name as string | null | undefined) || undefined,
|
|
86
86
|
email_verified: user.email_verified === true,
|
|
87
|
-
is_active: user.status === "
|
|
87
|
+
is_active: user.status === "ACTIVE", // Derived from status column
|
|
88
88
|
last_logon: (user.last_logon as string | null | undefined) || undefined,
|
|
89
89
|
profile_picture_url: (user.profile_picture_url as string | null | undefined) || undefined,
|
|
90
90
|
profile_source: profile_source_ui,
|
|
@@ -159,8 +159,8 @@ export async function get_authenticated_user_with_response(request: NextRequest)
|
|
|
159
159
|
|
|
160
160
|
const user = users[0];
|
|
161
161
|
|
|
162
|
-
// Check if user is still active (status must be '
|
|
163
|
-
if (user.status !== "
|
|
162
|
+
// Check if user is still active (status must be 'ACTIVE')
|
|
163
|
+
if (user.status !== "ACTIVE") {
|
|
164
164
|
// User is inactive - clear cookies
|
|
165
165
|
const response = NextResponse.json(
|
|
166
166
|
{ authenticated: false },
|
|
@@ -181,7 +181,7 @@ export async function get_authenticated_user_with_response(request: NextRequest)
|
|
|
181
181
|
email: user.email_address as string,
|
|
182
182
|
name: (user.name as string | null | undefined) || undefined,
|
|
183
183
|
email_verified: user.email_verified === true,
|
|
184
|
-
is_active: user.status === "
|
|
184
|
+
is_active: user.status === "ACTIVE", // Derived from status column
|
|
185
185
|
last_logon: (user.last_logon as string | null | undefined) || undefined,
|
|
186
186
|
profile_picture_url: (user.profile_picture_url as string | null | undefined) || undefined,
|
|
187
187
|
profile_source: profile_source_ui,
|
|
@@ -102,8 +102,8 @@ async function fetch_user_data_from_db(user_id: string): Promise<{
|
|
|
102
102
|
|
|
103
103
|
const user_db = users[0];
|
|
104
104
|
|
|
105
|
-
// Check if user is active (status must be '
|
|
106
|
-
if (user_db.status !== "
|
|
105
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
106
|
+
if (user_db.status !== "ACTIVE") {
|
|
107
107
|
throw new Error("User is inactive");
|
|
108
108
|
}
|
|
109
109
|
|
|
@@ -112,7 +112,7 @@ async function fetch_user_data_from_db(user_id: string): Promise<{
|
|
|
112
112
|
id: user_db.id as string,
|
|
113
113
|
name: (user_db.name as string | null) || null,
|
|
114
114
|
email_address: user_db.email_address as string,
|
|
115
|
-
is_active: user_db.status === "
|
|
115
|
+
is_active: user_db.status === "ACTIVE", // Derived from status column
|
|
116
116
|
profile_picture_url:
|
|
117
117
|
(user_db.profile_picture_url as string | null) || null,
|
|
118
118
|
app_user_data: parse_app_user_data(user_db.app_user_data),
|
|
@@ -53,8 +53,8 @@ export async function get_server_auth_user(): Promise<ServerAuthResult> {
|
|
|
53
53
|
|
|
54
54
|
const user = users[0];
|
|
55
55
|
|
|
56
|
-
// Check if user is active (status must be '
|
|
57
|
-
if (user.status !== "
|
|
56
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
57
|
+
if (user.status !== "ACTIVE") {
|
|
58
58
|
return { authenticated: false };
|
|
59
59
|
}
|
|
60
60
|
|
|
@@ -68,7 +68,7 @@ export async function get_server_auth_user(): Promise<ServerAuthResult> {
|
|
|
68
68
|
email: user.email_address as string,
|
|
69
69
|
name: (user.name as string | null | undefined) || undefined,
|
|
70
70
|
email_verified: user.email_verified === true,
|
|
71
|
-
is_active: user.status === "
|
|
71
|
+
is_active: user.status === "ACTIVE", // Derived from status column
|
|
72
72
|
last_logon: (user.last_logon as string | null | undefined) || undefined,
|
|
73
73
|
profile_picture_url: (user.profile_picture_url as string | null | undefined) || undefined,
|
|
74
74
|
profile_source: profile_source_ui,
|
|
@@ -133,6 +133,8 @@ export const DEFAULT_UI_SHELL = {
|
|
|
133
133
|
image_width: 400,
|
|
134
134
|
image_height: 400,
|
|
135
135
|
show_visual_panel: true,
|
|
136
|
+
/** Enable vertical centering of content (default: true) */
|
|
137
|
+
vertical_center: true,
|
|
136
138
|
} as const;
|
|
137
139
|
|
|
138
140
|
// section: profile_pic_menu
|
|
@@ -187,8 +189,8 @@ export const DEFAULT_NAVBAR = {
|
|
|
187
189
|
background_color: "",
|
|
188
190
|
/** Navbar text color (empty = inherit) */
|
|
189
191
|
text_color: "",
|
|
190
|
-
/** Navbar height in pixels (default:
|
|
191
|
-
height:
|
|
192
|
+
/** Navbar height in pixels (default: 40px for slim appearance) */
|
|
193
|
+
height: 40,
|
|
192
194
|
} as const;
|
|
193
195
|
|
|
194
196
|
// section: user_types
|
|
@@ -53,8 +53,8 @@ export async function authenticate_user(
|
|
|
53
53
|
|
|
54
54
|
const user = users[0];
|
|
55
55
|
|
|
56
|
-
// Check if user is active (status must be '
|
|
57
|
-
if (user.status !== "
|
|
56
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
57
|
+
if (user.status !== "ACTIVE") {
|
|
58
58
|
return {
|
|
59
59
|
success: false,
|
|
60
60
|
error: "Account is inactive. Please contact support.",
|
|
@@ -179,7 +179,7 @@ export async function handle_google_oauth_login(
|
|
|
179
179
|
email_address: email,
|
|
180
180
|
password_hash: "", // Empty string for Google-only users
|
|
181
181
|
email_verified: email_verified, // Trust Google's verification
|
|
182
|
-
status: "
|
|
182
|
+
status: "ACTIVE",
|
|
183
183
|
login_attempts: 0,
|
|
184
184
|
google_id,
|
|
185
185
|
auth_providers: "google",
|
|
@@ -73,7 +73,7 @@ export async function register_user(
|
|
|
73
73
|
email_address: email,
|
|
74
74
|
password_hash: password_hash,
|
|
75
75
|
email_verified: false,
|
|
76
|
-
status: "
|
|
76
|
+
status: "ACTIVE",
|
|
77
77
|
login_attempts: 0,
|
|
78
78
|
auth_providers: "email", // Track that this user registered with email/password
|
|
79
79
|
created_at: now,
|
|
@@ -8,7 +8,7 @@ import Image from "next/image";
|
|
|
8
8
|
import { Home } from "lucide-react";
|
|
9
9
|
import { cn } from "../../../../lib/utils";
|
|
10
10
|
// section: component
|
|
11
|
-
export function AuthNavbar({ logo_path = "", logo_width = 28, logo_height = 28, company_name = "", home_path = "/", home_label = "Home", show_home_link = true, background_color, text_color, height =
|
|
11
|
+
export function AuthNavbar({ logo_path = "", logo_width = 28, logo_height = 28, company_name = "", home_path = "/", home_label = "Home", show_home_link = true, background_color, text_color, height = 40, className, }) {
|
|
12
12
|
// Only show logo if logo_path is configured (non-empty)
|
|
13
13
|
const showLogo = logo_path !== "";
|
|
14
14
|
const navStyle = Object.assign(Object.assign({ height: `${height}px` }, (background_color && { backgroundColor: background_color })), (text_color && { color: text_color }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standalone_layout_wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/standalone_layout_wrapper.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAGjE,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAGF,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,OAAqB,EACrB,WAA8E,EAC9E,gBAAgB,EAChB,gBAAgB,EAChB,WAAkB,EAClB,eAAsB,EACtB,MAAM,EACN,cAAqB,GACtB,EAAE,4BAA4B,
|
|
1
|
+
{"version":3,"file":"standalone_layout_wrapper.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/shared/components/standalone_layout_wrapper.tsx"],"names":[],"mappings":"AAMA,OAAO,EAAc,KAAK,eAAe,EAAE,MAAM,eAAe,CAAC;AAGjE,MAAM,MAAM,4BAA4B,GAAG;IACzC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,yDAAyD;IACzD,MAAM,CAAC,EAAE,eAAe,GAAG,IAAI,CAAC;IAChC,2DAA2D;IAC3D,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B,CAAC;AAGF,wBAAgB,uBAAuB,CAAC,EACtC,QAAQ,EACR,OAAqB,EACrB,WAA8E,EAC9E,gBAAgB,EAChB,gBAAgB,EAChB,WAAkB,EAClB,eAAsB,EACtB,MAAM,EACN,cAAqB,GACtB,EAAE,4BAA4B,2CAgD9B"}
|
|
@@ -11,5 +11,5 @@ export function StandaloneLayoutWrapper({ children, heading = "hazo auth", descr
|
|
|
11
11
|
return (
|
|
12
12
|
// Single wrapper with min-h-screen and flexbox for proper layout
|
|
13
13
|
// wrapperClassName applied here for consuming app theming/background
|
|
14
|
-
_jsxs("div", { className: cn("cls_standalone_layout_outer cls_standalone_layout_wrapper flex min-h-screen w-full flex-col bg-background", wrapperClassName), children: [hasNavbar && _jsx(AuthNavbar, Object.assign({}, navbar)), _jsx("div", { className: cn("cls_standalone_layout_content_area flex-1", verticalCenter && "flex items-center justify-center"), children: _jsxs("div", { className: cn("cls_standalone_layout_content mx-auto flex w-full max-w-5xl
|
|
14
|
+
_jsxs("div", { className: cn("cls_standalone_layout_outer cls_standalone_layout_wrapper flex min-h-screen w-full flex-col bg-background", wrapperClassName), children: [hasNavbar && _jsx(AuthNavbar, Object.assign({}, navbar)), _jsx("div", { className: cn("cls_standalone_layout_content_area flex-1", verticalCenter && "flex items-center justify-center"), children: _jsxs("div", { className: cn("cls_standalone_layout_content mx-auto flex w-full flex-col", verticalCenter ? "max-w-5xl gap-2 p-4" : "max-w-5xl gap-6 p-6", contentClassName), children: [(showHeading || showDescription) && (_jsxs("div", { className: "cls_standalone_layout_header text-center", children: [showHeading && (_jsx("h1", { className: "cls_standalone_layout_title text-2xl font-semibold tracking-tight text-foreground", children: heading })), showDescription && (_jsx("p", { className: "cls_standalone_layout_description mt-2 text-sm text-muted-foreground", children: description }))] })), _jsx("div", { className: "cls_standalone_layout_body", children: children })] }) })] }));
|
|
15
15
|
}
|
|
@@ -4,5 +4,5 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
4
4
|
import { VisualPanel } from "./visual_panel";
|
|
5
5
|
// section: component
|
|
6
6
|
export function TwoColumnAuthLayout({ imageSrc, imageAlt, imageBackgroundColor, formContent, className, visualPanelClassName, formContainerClassName, }) {
|
|
7
|
-
return (_jsxs("div", { className: `cls_two_column_auth_layout
|
|
7
|
+
return (_jsxs("div", { className: `cls_two_column_auth_layout grid w-full max-w-5xl grid-cols-1 overflow-hidden rounded-xl border border-slate-200 bg-white shadow-sm md:grid-cols-2 md:min-h-[520px] ${className !== null && className !== void 0 ? className : ""}`, children: [_jsx(VisualPanel, { imageSrc: imageSrc, imageAlt: imageAlt, backgroundColor: imageBackgroundColor, className: visualPanelClassName }), _jsx("div", { className: `cls_two_column_auth_layout_form_container flex flex-col gap-6 p-8 ${formContainerClassName !== null && formContainerClassName !== void 0 ? formContainerClassName : ""}`, children: formContent })] }));
|
|
8
8
|
}
|
|
@@ -45,8 +45,8 @@ export async function get_authenticated_user(request) {
|
|
|
45
45
|
return { authenticated: false };
|
|
46
46
|
}
|
|
47
47
|
const user = users[0];
|
|
48
|
-
// Check if user is active (status must be '
|
|
49
|
-
if (user.status !== "
|
|
48
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
49
|
+
if (user.status !== "ACTIVE") {
|
|
50
50
|
return { authenticated: false };
|
|
51
51
|
}
|
|
52
52
|
// Map database profile_source to UI representation
|
|
@@ -58,7 +58,7 @@ export async function get_authenticated_user(request) {
|
|
|
58
58
|
email: user.email_address,
|
|
59
59
|
name: user.name || undefined,
|
|
60
60
|
email_verified: user.email_verified === true,
|
|
61
|
-
is_active: user.status === "
|
|
61
|
+
is_active: user.status === "ACTIVE", // Derived from status column
|
|
62
62
|
last_logon: user.last_logon || undefined,
|
|
63
63
|
profile_picture_url: user.profile_picture_url || undefined,
|
|
64
64
|
profile_source: profile_source_ui,
|
|
@@ -118,8 +118,8 @@ export async function get_authenticated_user_with_response(request) {
|
|
|
118
118
|
return { auth_result: { authenticated: false }, response };
|
|
119
119
|
}
|
|
120
120
|
const user = users[0];
|
|
121
|
-
// Check if user is still active (status must be '
|
|
122
|
-
if (user.status !== "
|
|
121
|
+
// Check if user is still active (status must be 'ACTIVE')
|
|
122
|
+
if (user.status !== "ACTIVE") {
|
|
123
123
|
// User is inactive - clear cookies
|
|
124
124
|
const response = NextResponse.json({ authenticated: false }, { status: 200 });
|
|
125
125
|
clear_auth_cookies(response);
|
|
@@ -135,7 +135,7 @@ export async function get_authenticated_user_with_response(request) {
|
|
|
135
135
|
email: user.email_address,
|
|
136
136
|
name: user.name || undefined,
|
|
137
137
|
email_verified: user.email_verified === true,
|
|
138
|
-
is_active: user.status === "
|
|
138
|
+
is_active: user.status === "ACTIVE", // Derived from status column
|
|
139
139
|
last_logon: user.last_logon || undefined,
|
|
140
140
|
profile_picture_url: user.profile_picture_url || undefined,
|
|
141
141
|
profile_source: profile_source_ui,
|
|
@@ -69,8 +69,8 @@ async function fetch_user_data_from_db(user_id) {
|
|
|
69
69
|
throw new Error("User not found");
|
|
70
70
|
}
|
|
71
71
|
const user_db = users[0];
|
|
72
|
-
// Check if user is active (status must be '
|
|
73
|
-
if (user_db.status !== "
|
|
72
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
73
|
+
if (user_db.status !== "ACTIVE") {
|
|
74
74
|
throw new Error("User is inactive");
|
|
75
75
|
}
|
|
76
76
|
// Build user object
|
|
@@ -78,7 +78,7 @@ async function fetch_user_data_from_db(user_id) {
|
|
|
78
78
|
id: user_db.id,
|
|
79
79
|
name: user_db.name || null,
|
|
80
80
|
email_address: user_db.email_address,
|
|
81
|
-
is_active: user_db.status === "
|
|
81
|
+
is_active: user_db.status === "ACTIVE", // Derived from status column
|
|
82
82
|
profile_picture_url: user_db.profile_picture_url || null,
|
|
83
83
|
app_user_data: parse_app_user_data(user_db.app_user_data),
|
|
84
84
|
};
|
|
@@ -30,8 +30,8 @@ export async function get_server_auth_user() {
|
|
|
30
30
|
return { authenticated: false };
|
|
31
31
|
}
|
|
32
32
|
const user = users[0];
|
|
33
|
-
// Check if user is active (status must be '
|
|
34
|
-
if (user.status !== "
|
|
33
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
34
|
+
if (user.status !== "ACTIVE") {
|
|
35
35
|
return { authenticated: false };
|
|
36
36
|
}
|
|
37
37
|
// Map database profile_source to UI representation
|
|
@@ -43,7 +43,7 @@ export async function get_server_auth_user() {
|
|
|
43
43
|
email: user.email_address,
|
|
44
44
|
name: user.name || undefined,
|
|
45
45
|
email_verified: user.email_verified === true,
|
|
46
|
-
is_active: user.status === "
|
|
46
|
+
is_active: user.status === "ACTIVE", // Derived from status column
|
|
47
47
|
last_logon: user.last_logon || undefined,
|
|
48
48
|
profile_picture_url: user.profile_picture_url || undefined,
|
|
49
49
|
profile_source: profile_source_ui,
|
|
@@ -98,6 +98,8 @@ export declare const DEFAULT_UI_SHELL: {
|
|
|
98
98
|
readonly image_width: 400;
|
|
99
99
|
readonly image_height: 400;
|
|
100
100
|
readonly show_visual_panel: true;
|
|
101
|
+
/** Enable vertical centering of content (default: true) */
|
|
102
|
+
readonly vertical_center: true;
|
|
101
103
|
};
|
|
102
104
|
export declare const DEFAULT_PROFILE_PIC_MENU: {
|
|
103
105
|
readonly show_single_button: false;
|
|
@@ -144,8 +146,8 @@ export declare const DEFAULT_NAVBAR: {
|
|
|
144
146
|
readonly background_color: "";
|
|
145
147
|
/** Navbar text color (empty = inherit) */
|
|
146
148
|
readonly text_color: "";
|
|
147
|
-
/** Navbar height in pixels (default:
|
|
148
|
-
readonly height:
|
|
149
|
+
/** Navbar height in pixels (default: 40px for slim appearance) */
|
|
150
|
+
readonly height: 40;
|
|
149
151
|
};
|
|
150
152
|
export declare const DEFAULT_USER_TYPES: {
|
|
151
153
|
/** Enable user types feature (default: false) */
|
|
@@ -286,6 +288,8 @@ export declare const HAZO_AUTH_DEFAULTS: {
|
|
|
286
288
|
readonly image_width: 400;
|
|
287
289
|
readonly image_height: 400;
|
|
288
290
|
readonly show_visual_panel: true;
|
|
291
|
+
/** Enable vertical centering of content (default: true) */
|
|
292
|
+
readonly vertical_center: true;
|
|
289
293
|
};
|
|
290
294
|
readonly profilePicMenu: {
|
|
291
295
|
readonly show_single_button: false;
|
|
@@ -360,8 +364,8 @@ export declare const HAZO_AUTH_DEFAULTS: {
|
|
|
360
364
|
readonly background_color: "";
|
|
361
365
|
/** Navbar text color (empty = inherit) */
|
|
362
366
|
readonly text_color: "";
|
|
363
|
-
/** Navbar height in pixels (default:
|
|
364
|
-
readonly height:
|
|
367
|
+
/** Navbar height in pixels (default: 40px for slim appearance) */
|
|
368
|
+
readonly height: 40;
|
|
365
369
|
};
|
|
366
370
|
readonly userTypes: {
|
|
367
371
|
/** Enable user types feature (default: false) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default_config.d.ts","sourceRoot":"","sources":["../../../src/lib/config/default_config.ts"],"names":[],"mappings":"AAKA,eAAO,MAAM,6BAA6B;;;;;;CAMhC,CAAC;AAGX,eAAO,MAA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G,SAAS;;;;;;;;gCAUlB,MAAM,GAAG,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAqDjB,YAAY,GAAG,cAAc;;;;;QAK1D,2DAA2D;;;;;;;;;;;;;;;;QAsB3D,kHAAkH;;QAElH,8CAA8C;;QAE9C,iGAAiG;;QAEjG,kDAAkD;;QAElD,0EAA0E;;;;QAwC1E,4FAA4F;;QAE5F,+BAA+B;;QAE/B,wCAAwC;;QAExC,iEAAiE;;QAEjE,2BAA2B;;QAE3B,4BAA4B;;QAE5B,4CAA4C;;QAE5C,mDAAmD;;QAEnD,sCAAsC;;QAEtC,yBAAyB;;QAEzB,2CAA2C;;QAE3C,6CAA6C;;QAE7C,8CAA8C;;;;QA1D9C,kCAAkC;;QAElC,iEAAiE;;QAEjE,2BAA2B;;QAE3B,4BAA4B;;QAE5B,sDAAsD;;QAEtD,qBAAqB;;QAErB,sBAAsB;;QAEtB,qBAAqB;;QAErB,4DAA4D;;QAE5D,0CAA0C;;QAE1C,kEAAkE;;;;QAMlE,iDAAiD;;QAEjD,2DAA2D;;;CA8DnD,CAAC;AAGX;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,OAAO,kBAAkB,CAAC"}
|
|
@@ -117,6 +117,8 @@ export const DEFAULT_UI_SHELL = {
|
|
|
117
117
|
image_width: 400,
|
|
118
118
|
image_height: 400,
|
|
119
119
|
show_visual_panel: true,
|
|
120
|
+
/** Enable vertical centering of content (default: true) */
|
|
121
|
+
vertical_center: true,
|
|
120
122
|
};
|
|
121
123
|
// section: profile_pic_menu
|
|
122
124
|
export const DEFAULT_PROFILE_PIC_MENU = {
|
|
@@ -167,8 +169,8 @@ export const DEFAULT_NAVBAR = {
|
|
|
167
169
|
background_color: "",
|
|
168
170
|
/** Navbar text color (empty = inherit) */
|
|
169
171
|
text_color: "",
|
|
170
|
-
/** Navbar height in pixels (default:
|
|
171
|
-
height:
|
|
172
|
+
/** Navbar height in pixels (default: 40px for slim appearance) */
|
|
173
|
+
height: 40,
|
|
172
174
|
};
|
|
173
175
|
// section: user_types
|
|
174
176
|
export const DEFAULT_USER_TYPES = {
|
|
@@ -27,8 +27,8 @@ export async function authenticate_user(adapter, data) {
|
|
|
27
27
|
};
|
|
28
28
|
}
|
|
29
29
|
const user = users[0];
|
|
30
|
-
// Check if user is active (status must be '
|
|
31
|
-
if (user.status !== "
|
|
30
|
+
// Check if user is active (status must be 'ACTIVE')
|
|
31
|
+
if (user.status !== "ACTIVE") {
|
|
32
32
|
return {
|
|
33
33
|
success: false,
|
|
34
34
|
error: "Account is inactive. Please contact support.",
|
|
@@ -112,7 +112,7 @@ export async function handle_google_oauth_login(adapter, data) {
|
|
|
112
112
|
email_address: email,
|
|
113
113
|
password_hash: "", // Empty string for Google-only users
|
|
114
114
|
email_verified: email_verified, // Trust Google's verification
|
|
115
|
-
status: "
|
|
115
|
+
status: "ACTIVE",
|
|
116
116
|
login_attempts: 0,
|
|
117
117
|
google_id,
|
|
118
118
|
auth_providers: "google",
|
|
@@ -43,7 +43,7 @@ export async function register_user(adapter, data) {
|
|
|
43
43
|
email_address: email,
|
|
44
44
|
password_hash: password_hash,
|
|
45
45
|
email_verified: false,
|
|
46
|
-
status: "
|
|
46
|
+
status: "ACTIVE",
|
|
47
47
|
login_attempts: 0,
|
|
48
48
|
auth_providers: "email", // Track that this user registered with email/password
|
|
49
49
|
created_at: now,
|
|
@@ -29,7 +29,7 @@ export declare function GET(request: NextRequest): Promise<NextResponse<{
|
|
|
29
29
|
}[];
|
|
30
30
|
}>>;
|
|
31
31
|
/**
|
|
32
|
-
* PATCH - Update user (deactivate: set status to '
|
|
32
|
+
* PATCH - Update user (deactivate: set status to 'BLOCKED', etc.)
|
|
33
33
|
*/
|
|
34
34
|
export declare function PATCH(request: NextRequest): Promise<NextResponse<{
|
|
35
35
|
error: string;
|
|
@@ -67,7 +67,7 @@ export async function GET(request) {
|
|
|
67
67
|
name: user.name || null,
|
|
68
68
|
email_address: user.email_address,
|
|
69
69
|
email_verified: user.email_verified || false,
|
|
70
|
-
is_active: user.status === "
|
|
70
|
+
is_active: user.status === "ACTIVE", // Derived from status column
|
|
71
71
|
last_logon: user.last_logon || null,
|
|
72
72
|
created_at: user.created_at || null,
|
|
73
73
|
profile_picture_url: user.profile_picture_url || null,
|
|
@@ -91,7 +91,7 @@ export async function GET(request) {
|
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* PATCH - Update user (deactivate: set status to '
|
|
94
|
+
* PATCH - Update user (deactivate: set status to 'BLOCKED', etc.)
|
|
95
95
|
*/
|
|
96
96
|
export async function PATCH(request) {
|
|
97
97
|
const logger = create_app_logger();
|
|
@@ -109,7 +109,7 @@ export async function PATCH(request) {
|
|
|
109
109
|
const hazoConnect = get_hazo_connect_instance();
|
|
110
110
|
// Handle is_active if provided (maps to status column)
|
|
111
111
|
if (typeof is_active === "boolean") {
|
|
112
|
-
update_data.status = is_active ? "
|
|
112
|
+
update_data.status = is_active ? "ACTIVE" : "BLOCKED";
|
|
113
113
|
}
|
|
114
114
|
// Handle app_user_data if provided
|
|
115
115
|
if (app_user_data !== undefined) {
|