hazo_auth 6.1.1 → 7.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +65 -167
- package/SETUP_CHECKLIST.md +28 -100
- package/cli-src/cli/generate.ts +1 -10
- package/cli-src/cli/validate.ts +0 -4
- package/cli-src/lib/auth/auth_types.ts +12 -21
- package/cli-src/lib/auth/hazo_get_tenant_auth.server.ts +24 -25
- package/cli-src/lib/auth/index.ts +2 -2
- package/cli-src/lib/auth/nextauth_config.ts +61 -1
- package/cli-src/lib/auth/with_auth.server.ts +15 -15
- package/cli-src/lib/config/default_config.ts +8 -0
- package/cli-src/lib/cookies_config.server.ts +1 -1
- package/cli-src/lib/login_config.server.ts +2 -18
- package/cli-src/lib/oauth_config.server.ts +32 -0
- package/cli-src/lib/register_config.server.ts +4 -0
- package/cli-src/lib/services/email_template_manifest.ts +0 -17
- package/cli-src/lib/services/index.ts +2 -8
- package/cli-src/lib/services/oauth_service.ts +143 -0
- package/cli-src/lib/services/otp_service.ts +7 -2
- package/cli-src/lib/services/session_token_service.ts +0 -2
- package/config/hazo_auth_config.example.ini +0 -38
- package/dist/cli/generate.d.ts.map +1 -1
- package/dist/cli/generate.js +1 -10
- package/dist/cli/validate.d.ts.map +1 -1
- package/dist/cli/validate.js +0 -4
- package/dist/client.d.ts +0 -2
- package/dist/client.d.ts.map +1 -1
- package/dist/client.js +0 -1
- package/dist/components/layouts/login/index.d.ts +5 -7
- package/dist/components/layouts/login/index.d.ts.map +1 -1
- package/dist/components/layouts/login/index.js +5 -2
- package/dist/components/layouts/otp/index.d.ts +12 -1
- package/dist/components/layouts/otp/index.d.ts.map +1 -1
- package/dist/components/layouts/otp/index.js +4 -2
- package/dist/components/layouts/register/index.d.ts +4 -0
- package/dist/components/layouts/register/index.d.ts.map +1 -1
- package/dist/components/layouts/register/index.js +4 -1
- package/dist/components/layouts/shared/components/facebook_sign_in_button.d.ts +21 -0
- package/dist/components/layouts/shared/components/facebook_sign_in_button.d.ts.map +1 -0
- package/dist/components/layouts/shared/components/facebook_sign_in_button.js +47 -0
- package/dist/components/layouts/shared/components/sidebar_layout_wrapper.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/sidebar_layout_wrapper.js +3 -8
- package/dist/components/layouts/shared/index.d.ts +2 -0
- package/dist/components/layouts/shared/index.d.ts.map +1 -1
- package/dist/components/layouts/shared/index.js +1 -0
- package/dist/components/layouts/user_management/index.d.ts.map +1 -1
- package/dist/components/layouts/user_management/index.js +39 -2
- package/dist/consent/consent_state.d.ts +18 -0
- package/dist/consent/consent_state.d.ts.map +1 -0
- package/dist/consent/consent_state.js +29 -0
- package/dist/consent/cookie_consent_banner.d.ts +11 -0
- package/dist/consent/cookie_consent_banner.d.ts.map +1 -0
- package/dist/consent/cookie_consent_banner.js +40 -0
- package/dist/consent/gtm_mapping.d.ts +13 -0
- package/dist/consent/gtm_mapping.d.ts.map +1 -0
- package/dist/consent/gtm_mapping.js +30 -0
- package/dist/consent/index.d.ts +7 -0
- package/dist/consent/index.d.ts.map +1 -0
- package/dist/consent/index.js +7 -0
- package/dist/consent/manage_modal.d.ts +2 -0
- package/dist/consent/manage_modal.d.ts.map +1 -0
- package/dist/consent/manage_modal.js +33 -0
- package/dist/consent/read_consent.d.ts +15 -0
- package/dist/consent/read_consent.d.ts.map +1 -0
- package/dist/consent/read_consent.js +23 -0
- package/dist/consent/use_consent.d.ts +7 -0
- package/dist/consent/use_consent.d.ts.map +1 -0
- package/dist/consent/use_consent.js +55 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/lib/auth/auth_types.d.ts +12 -13
- package/dist/lib/auth/auth_types.d.ts.map +1 -1
- package/dist/lib/auth/auth_types.js +0 -8
- package/dist/lib/auth/hazo_get_tenant_auth.server.d.ts +7 -8
- package/dist/lib/auth/hazo_get_tenant_auth.server.d.ts.map +1 -1
- package/dist/lib/auth/hazo_get_tenant_auth.server.js +22 -23
- package/dist/lib/auth/index.d.ts +2 -2
- package/dist/lib/auth/index.d.ts.map +1 -1
- package/dist/lib/auth/nextauth_config.d.ts.map +1 -1
- package/dist/lib/auth/nextauth_config.js +50 -1
- package/dist/lib/auth/with_auth.server.d.ts +13 -13
- package/dist/lib/auth/with_auth.server.d.ts.map +1 -1
- package/dist/lib/auth/with_auth.server.js +2 -2
- package/dist/lib/config/default_config.d.ts +16 -0
- package/dist/lib/config/default_config.d.ts.map +1 -1
- package/dist/lib/config/default_config.js +8 -0
- package/dist/lib/cookies_config.server.d.ts +1 -1
- package/dist/lib/cookies_config.server.js +1 -1
- package/dist/lib/login_config.server.d.ts +0 -6
- package/dist/lib/login_config.server.d.ts.map +1 -1
- package/dist/lib/login_config.server.js +2 -11
- package/dist/lib/oauth_config.server.d.ts +8 -0
- package/dist/lib/oauth_config.server.d.ts.map +1 -1
- package/dist/lib/oauth_config.server.js +10 -0
- package/dist/lib/register_config.server.d.ts +2 -0
- package/dist/lib/register_config.server.d.ts.map +1 -1
- package/dist/lib/register_config.server.js +2 -0
- package/dist/lib/services/email_template_manifest.d.ts.map +1 -1
- package/dist/lib/services/email_template_manifest.js +0 -17
- package/dist/lib/services/index.d.ts +0 -2
- package/dist/lib/services/index.d.ts.map +1 -1
- package/dist/lib/services/index.js +0 -1
- package/dist/lib/services/oauth_service.d.ts +13 -0
- package/dist/lib/services/oauth_service.d.ts.map +1 -1
- package/dist/lib/services/oauth_service.js +122 -0
- package/dist/lib/services/otp_service.d.ts +1 -1
- package/dist/lib/services/otp_service.d.ts.map +1 -1
- package/dist/lib/services/otp_service.js +6 -1
- package/dist/lib/services/session_token_service.d.ts +0 -2
- package/dist/lib/services/session_token_service.d.ts.map +1 -1
- package/dist/lib/services/session_token_service.js +0 -2
- package/dist/server/routes/assets.d.ts +8 -0
- package/dist/server/routes/assets.d.ts.map +1 -0
- package/dist/server/routes/assets.js +38 -0
- package/dist/server/routes/consent_me.d.ts +4 -0
- package/dist/server/routes/consent_me.d.ts.map +1 -0
- package/dist/server/routes/consent_me.js +15 -0
- package/dist/server/routes/index.d.ts +6 -3
- package/dist/server/routes/index.d.ts.map +1 -1
- package/dist/server/routes/index.js +9 -4
- package/dist/server/routes/me.d.ts.map +1 -1
- package/dist/server/routes/me.js +1 -43
- package/dist/server/routes/oauth_facebook_callback.d.ts +8 -0
- package/dist/server/routes/oauth_facebook_callback.d.ts.map +1 -0
- package/dist/server/routes/oauth_facebook_callback.js +164 -0
- package/dist/server/routes/otp/verify.js +2 -2
- package/dist/server/routes/strings_defaults.d.ts +4 -0
- package/dist/server/routes/strings_defaults.d.ts.map +1 -0
- package/dist/server/routes/strings_defaults.js +7 -0
- package/dist/server/routes/user_management_users.d.ts +11 -0
- package/dist/server/routes/user_management_users.d.ts.map +1 -1
- package/dist/server/routes/user_management_users.js +50 -0
- package/dist/server-lib.d.ts +0 -3
- package/dist/server-lib.d.ts.map +1 -1
- package/dist/server-lib.js +0 -2
- package/dist/server_pages/forgot_password.d.ts +1 -1
- package/dist/server_pages/forgot_password.d.ts.map +1 -1
- package/dist/server_pages/forgot_password.js +9 -3
- package/dist/server_pages/forgot_password_client_wrapper.d.ts +3 -1
- package/dist/server_pages/forgot_password_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/forgot_password_client_wrapper.js +2 -2
- package/dist/server_pages/index.d.ts +2 -0
- package/dist/server_pages/index.d.ts.map +1 -1
- package/dist/server_pages/index.js +1 -0
- package/dist/server_pages/login.d.ts +1 -1
- package/dist/server_pages/login.d.ts.map +1 -1
- package/dist/server_pages/login.js +12 -3
- package/dist/server_pages/login_client_wrapper.d.ts +4 -1
- package/dist/server_pages/login_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/login_client_wrapper.js +2 -2
- package/dist/server_pages/my_settings.d.ts +1 -1
- package/dist/server_pages/my_settings.d.ts.map +1 -1
- package/dist/server_pages/my_settings.js +1 -2
- package/dist/server_pages/otp.d.ts +16 -2
- package/dist/server_pages/otp.d.ts.map +1 -1
- package/dist/server_pages/otp.js +10 -3
- package/dist/server_pages/register.d.ts +1 -1
- package/dist/server_pages/register.d.ts.map +1 -1
- package/dist/server_pages/register.js +11 -3
- package/dist/server_pages/register_client_wrapper.d.ts +3 -1
- package/dist/server_pages/register_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/register_client_wrapper.js +2 -2
- package/dist/server_pages/reset_password.d.ts +1 -1
- package/dist/server_pages/reset_password.d.ts.map +1 -1
- package/dist/server_pages/reset_password.js +9 -3
- package/dist/server_pages/reset_password_client_wrapper.d.ts +3 -1
- package/dist/server_pages/reset_password_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/reset_password_client_wrapper.js +2 -2
- package/dist/server_pages/verify_email.d.ts +1 -1
- package/dist/server_pages/verify_email.d.ts.map +1 -1
- package/dist/server_pages/verify_email.js +8 -3
- package/dist/server_pages/verify_email_client_wrapper.d.ts +3 -1
- package/dist/server_pages/verify_email_client_wrapper.d.ts.map +1 -1
- package/dist/server_pages/verify_email_client_wrapper.js +2 -2
- package/dist/strings/default_strings.d.ts +47 -0
- package/dist/strings/default_strings.d.ts.map +1 -0
- package/dist/strings/default_strings.js +18 -0
- package/dist/strings/index.d.ts +4 -0
- package/dist/strings/index.d.ts.map +1 -0
- package/dist/strings/index.js +3 -0
- package/dist/strings/strings_context.d.ts +12 -0
- package/dist/strings/strings_context.d.ts.map +1 -0
- package/dist/strings/strings_context.js +23 -0
- package/dist/strings/strings_provider.d.ts +26 -0
- package/dist/strings/strings_provider.d.ts.map +1 -0
- package/dist/strings/strings_provider.js +45 -0
- package/dist/theme/create_theme.d.ts +7 -0
- package/dist/theme/create_theme.d.ts.map +1 -0
- package/dist/theme/create_theme.js +97 -0
- package/dist/theme/hex_to_hsl.d.ts +16 -0
- package/dist/theme/hex_to_hsl.d.ts.map +1 -0
- package/dist/theme/hex_to_hsl.js +110 -0
- package/dist/theme/index.d.ts +4 -0
- package/dist/theme/index.d.ts.map +1 -0
- package/dist/theme/index.js +3 -0
- package/dist/theme/luminance.d.ts +11 -0
- package/dist/theme/luminance.d.ts.map +1 -0
- package/dist/theme/luminance.js +45 -0
- package/dist/theme/theme_provider.d.ts +14 -0
- package/dist/theme/theme_provider.d.ts.map +1 -0
- package/dist/theme/theme_provider.js +23 -0
- package/dist/theme/theme_types.d.ts +36 -0
- package/dist/theme/theme_types.d.ts.map +1 -0
- package/dist/theme/theme_types.js +1 -0
- package/dist/themes/index.d.ts +2 -0
- package/dist/themes/index.d.ts.map +1 -0
- package/dist/themes/index.js +2 -0
- package/dist/themes/preset_neutral.d.ts +3 -0
- package/dist/themes/preset_neutral.d.ts.map +1 -0
- package/dist/themes/preset_neutral.js +14 -0
- package/package.json +25 -22
|
@@ -0,0 +1,164 @@
|
|
|
1
|
+
// file_description: Custom OAuth callback handler that creates hazo_auth session after Facebook sign-in
|
|
2
|
+
// section: imports
|
|
3
|
+
import { NextResponse } from "next/server";
|
|
4
|
+
import { getToken } from "next-auth/jwt";
|
|
5
|
+
import { create_app_logger } from "../../lib/app_logger.js";
|
|
6
|
+
import { create_session_token } from "../../lib/services/session_token_service.js";
|
|
7
|
+
import { get_filename, get_line_number } from "../../lib/utils/api_route_helpers.js";
|
|
8
|
+
import { get_login_config } from "../../lib/login_config.server.js";
|
|
9
|
+
import { get_cookie_name, get_cookie_options, BASE_COOKIE_NAMES } from "../../lib/cookies_config.server.js";
|
|
10
|
+
import { get_hazo_connect_instance } from "../../lib/hazo_connect_instance.server.js";
|
|
11
|
+
import { get_post_login_redirect } from "../../lib/services/post_verification_service.js";
|
|
12
|
+
import { get_oauth_config } from "../../lib/oauth_config.server.js";
|
|
13
|
+
import { rewrite_request_for_proxy } from "../../lib/utils/proxy_request.js";
|
|
14
|
+
// section: api_handler
|
|
15
|
+
/**
|
|
16
|
+
* Handles the OAuth callback after Facebook sign-in
|
|
17
|
+
* The user creation/linking is done in NextAuth signIn callback
|
|
18
|
+
* This route just sets the hazo_auth session cookies
|
|
19
|
+
*/
|
|
20
|
+
export async function GET(original_request) {
|
|
21
|
+
// Rewrite request.url to public origin when behind a reverse proxy.
|
|
22
|
+
const request = rewrite_request_for_proxy(original_request);
|
|
23
|
+
const logger = create_app_logger();
|
|
24
|
+
// Detect if request came through HTTPS proxy (Cloudflare tunnel, etc.)
|
|
25
|
+
const is_secure = original_request.headers.get("x-forwarded-proto") === "https" ||
|
|
26
|
+
request.url.startsWith("https://");
|
|
27
|
+
// Resolve the configured sign-in page up-front so early error redirects
|
|
28
|
+
// honour [hazo_auth__oauth] sign_in_page just like the success path.
|
|
29
|
+
const sign_in_page = get_oauth_config().sign_in_page;
|
|
30
|
+
try {
|
|
31
|
+
// Get the NextAuth token from the session
|
|
32
|
+
const token = (await getToken({
|
|
33
|
+
req: request,
|
|
34
|
+
secureCookie: is_secure,
|
|
35
|
+
}));
|
|
36
|
+
logger.debug("facebook_callback_token_received", {
|
|
37
|
+
filename: get_filename(),
|
|
38
|
+
line_number: get_line_number(),
|
|
39
|
+
has_token: !!token,
|
|
40
|
+
has_email: !!(token === null || token === void 0 ? void 0 : token.email),
|
|
41
|
+
has_hazo_user_id: !!(token === null || token === void 0 ? void 0 : token.hazo_user_id),
|
|
42
|
+
});
|
|
43
|
+
if (!token) {
|
|
44
|
+
logger.warn("facebook_callback_no_token", {
|
|
45
|
+
filename: get_filename(),
|
|
46
|
+
line_number: get_line_number(),
|
|
47
|
+
note: "No NextAuth token found - user may not have completed Facebook sign-in",
|
|
48
|
+
});
|
|
49
|
+
const login_url = new URL(sign_in_page, request.url);
|
|
50
|
+
login_url.searchParams.set("error", "oauth_failed");
|
|
51
|
+
return NextResponse.redirect(login_url.toString());
|
|
52
|
+
}
|
|
53
|
+
// Validate we have the required data
|
|
54
|
+
if (!token.email || !token.hazo_user_id) {
|
|
55
|
+
logger.warn("facebook_callback_missing_data", {
|
|
56
|
+
filename: get_filename(),
|
|
57
|
+
line_number: get_line_number(),
|
|
58
|
+
has_email: !!token.email,
|
|
59
|
+
has_hazo_user_id: !!token.hazo_user_id,
|
|
60
|
+
});
|
|
61
|
+
const login_url = new URL(sign_in_page, request.url);
|
|
62
|
+
login_url.searchParams.set("error", "oauth_incomplete");
|
|
63
|
+
return NextResponse.redirect(login_url.toString());
|
|
64
|
+
}
|
|
65
|
+
const user_id = token.hazo_user_id;
|
|
66
|
+
const email = token.email;
|
|
67
|
+
logger.debug("facebook_callback_success", {
|
|
68
|
+
filename: get_filename(),
|
|
69
|
+
line_number: get_line_number(),
|
|
70
|
+
user_id,
|
|
71
|
+
email,
|
|
72
|
+
});
|
|
73
|
+
// Get redirect URL based on user's scope/invitation status
|
|
74
|
+
const loginConfig = get_login_config();
|
|
75
|
+
const oauthConfig = get_oauth_config();
|
|
76
|
+
// Per-request override: same `?next=` pattern as Google callback.
|
|
77
|
+
const raw_next = request.nextUrl.searchParams.get("next");
|
|
78
|
+
const safe_next = raw_next &&
|
|
79
|
+
raw_next.startsWith("/") &&
|
|
80
|
+
!raw_next.startsWith("//") &&
|
|
81
|
+
!/^[a-z][a-z0-9+.\-]*:/i.test(raw_next)
|
|
82
|
+
? raw_next
|
|
83
|
+
: null;
|
|
84
|
+
// Check if user needs onboarding
|
|
85
|
+
const hazoConnect = get_hazo_connect_instance();
|
|
86
|
+
const { redirect_url: determined_redirect, needs_onboarding, invitation_check_skipped, invitation_table_error, } = await get_post_login_redirect(hazoConnect, user_id, email, {
|
|
87
|
+
default_redirect: safe_next || oauthConfig.default_redirect || loginConfig.redirectRoute || "/",
|
|
88
|
+
create_firm_url: oauthConfig.create_firm_url,
|
|
89
|
+
skip_invitation_check: oauthConfig.skip_invitation_check,
|
|
90
|
+
no_scope_redirect: safe_next || oauthConfig.no_scope_redirect,
|
|
91
|
+
});
|
|
92
|
+
// Log warning if invitation table is missing
|
|
93
|
+
if (invitation_table_error) {
|
|
94
|
+
logger.warn("invitation_table_missing", {
|
|
95
|
+
filename: get_filename(),
|
|
96
|
+
line_number: get_line_number(),
|
|
97
|
+
user_id,
|
|
98
|
+
email,
|
|
99
|
+
note: "hazo_invitations table does not exist - run migration or set skip_invitation_check=true in [hazo_auth__oauth]",
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
logger.debug("facebook_callback_post_login_redirect", {
|
|
103
|
+
filename: get_filename(),
|
|
104
|
+
line_number: get_line_number(),
|
|
105
|
+
user_id,
|
|
106
|
+
email,
|
|
107
|
+
redirect_url: determined_redirect,
|
|
108
|
+
needs_onboarding,
|
|
109
|
+
invitation_check_skipped,
|
|
110
|
+
invitation_table_error,
|
|
111
|
+
});
|
|
112
|
+
// Create redirect response
|
|
113
|
+
const redirect_url = new URL(determined_redirect, request.url);
|
|
114
|
+
const response = NextResponse.redirect(redirect_url.toString());
|
|
115
|
+
// Set authentication cookies
|
|
116
|
+
const base_cookie_options = {
|
|
117
|
+
httpOnly: true,
|
|
118
|
+
secure: process.env.NODE_ENV === "production" || is_secure,
|
|
119
|
+
sameSite: "lax",
|
|
120
|
+
path: "/",
|
|
121
|
+
maxAge: 60 * 60 * 24 * 30, // 30 days
|
|
122
|
+
};
|
|
123
|
+
const cookie_options = get_cookie_options(base_cookie_options);
|
|
124
|
+
response.cookies.set(get_cookie_name(BASE_COOKIE_NAMES.USER_ID), user_id, cookie_options);
|
|
125
|
+
response.cookies.set(get_cookie_name(BASE_COOKIE_NAMES.USER_EMAIL), email, cookie_options);
|
|
126
|
+
// Create and set JWT session token
|
|
127
|
+
try {
|
|
128
|
+
const session_token = await create_session_token(user_id, email);
|
|
129
|
+
response.cookies.set(get_cookie_name(BASE_COOKIE_NAMES.SESSION), session_token, cookie_options);
|
|
130
|
+
}
|
|
131
|
+
catch (token_error) {
|
|
132
|
+
const token_error_message = token_error instanceof Error ? token_error.message : "Unknown error";
|
|
133
|
+
logger.warn("facebook_callback_session_token_creation_failed", {
|
|
134
|
+
filename: get_filename(),
|
|
135
|
+
line_number: get_line_number(),
|
|
136
|
+
user_id,
|
|
137
|
+
email,
|
|
138
|
+
error: token_error_message,
|
|
139
|
+
note: "OAuth login succeeded but session token creation failed - using legacy cookies",
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
// Set session kind cookie so downstream can identify sign-in method
|
|
143
|
+
response.cookies.set(get_cookie_name(BASE_COOKIE_NAMES.SESSION_KIND), "facebook", cookie_options);
|
|
144
|
+
logger.info("facebook_callback_session_created", {
|
|
145
|
+
filename: get_filename(),
|
|
146
|
+
user_id,
|
|
147
|
+
email,
|
|
148
|
+
});
|
|
149
|
+
return response;
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
const error_message = error instanceof Error ? error.message : "Unknown error";
|
|
153
|
+
const error_stack = error instanceof Error ? error.stack : undefined;
|
|
154
|
+
logger.error("facebook_callback_error", {
|
|
155
|
+
filename: get_filename(),
|
|
156
|
+
line_number: get_line_number(),
|
|
157
|
+
error_message,
|
|
158
|
+
error_stack,
|
|
159
|
+
});
|
|
160
|
+
const login_url = new URL(sign_in_page, request.url);
|
|
161
|
+
login_url.searchParams.set("error", "oauth_error");
|
|
162
|
+
return NextResponse.redirect(login_url.toString());
|
|
163
|
+
}
|
|
164
|
+
}
|
|
@@ -28,7 +28,7 @@ export async function otpVerifyPOST(request) {
|
|
|
28
28
|
ip,
|
|
29
29
|
});
|
|
30
30
|
if (result.ok === false) {
|
|
31
|
-
return NextResponse.json({ ok: false, error:
|
|
31
|
+
return NextResponse.json({ ok: false, error: result.error }, { status: 401 });
|
|
32
32
|
}
|
|
33
33
|
const ttl_seconds = hazo_auth_otp_session_ttl_seconds();
|
|
34
34
|
const base_cookie_options = {
|
|
@@ -53,6 +53,6 @@ export async function otpVerifyPOST(request) {
|
|
|
53
53
|
catch (err) {
|
|
54
54
|
const msg = err instanceof Error ? err.message : String(err);
|
|
55
55
|
logger.error("otp_verify_route_error", { error: msg });
|
|
56
|
-
return NextResponse.json({ ok: false, error: "invalid_or_expired" }, { status:
|
|
56
|
+
return NextResponse.json({ ok: false, error: "invalid_or_expired" }, { status: 401 });
|
|
57
57
|
}
|
|
58
58
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"strings_defaults.d.ts","sourceRoot":"","sources":["../../../src/server/routes/strings_defaults.ts"],"names":[],"mappings":"AACA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAG3C,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,YAAY,CAAC,CAEhE"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
// file_description: Route handler returning the DEFAULT_STRINGS object for introspection and testing
|
|
2
|
+
import "server-only";
|
|
3
|
+
import { NextResponse } from "next/server";
|
|
4
|
+
import { DEFAULT_STRINGS } from "../../strings/default_strings.js";
|
|
5
|
+
export async function stringsDefaultsGET() {
|
|
6
|
+
return NextResponse.json(DEFAULT_STRINGS, { status: 200 });
|
|
7
|
+
}
|
|
@@ -44,4 +44,15 @@ export declare function POST(request: NextRequest): Promise<NextResponse<{
|
|
|
44
44
|
}> | NextResponse<{
|
|
45
45
|
success: boolean;
|
|
46
46
|
}>>;
|
|
47
|
+
/**
|
|
48
|
+
* DELETE - Hard-delete a user from hazo_users (cascades to all related rows).
|
|
49
|
+
* Body: { user_id: string }
|
|
50
|
+
* Requires: admin_user_management permission (enforced by UI, not here — same
|
|
51
|
+
* pattern as PATCH/POST in this file which also don't re-auth).
|
|
52
|
+
*/
|
|
53
|
+
export declare function DELETE(request: NextRequest): Promise<NextResponse<{
|
|
54
|
+
error: string;
|
|
55
|
+
}> | NextResponse<{
|
|
56
|
+
success: boolean;
|
|
57
|
+
}>>;
|
|
47
58
|
//# sourceMappingURL=user_management_users.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"user_management_users.d.ts","sourceRoot":"","sources":["../../../src/server/routes/user_management_users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAexD,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAGvC;;;GAGG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;IAyF7C;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,WAAW;;;;IAgI/C;AAED;;GAEG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW;;;;IA2E9C"}
|
|
1
|
+
{"version":3,"file":"user_management_users.d.ts","sourceRoot":"","sources":["../../../src/server/routes/user_management_users.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAexD,eAAO,MAAM,OAAO,kBAAkB,CAAC;AAGvC;;;GAGG;AACH,wBAAsB,GAAG,CAAC,OAAO,EAAE,WAAW;;;;;;;;;;;;;;;;;;;;;;;IAyF7C;AAED;;GAEG;AACH,wBAAsB,KAAK,CAAC,OAAO,EAAE,WAAW;;;;IAgI/C;AAED;;GAEG;AACH,wBAAsB,IAAI,CAAC,OAAO,EAAE,WAAW;;;;IA2E9C;AAED;;;;;GAKG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE,WAAW;;;;IAuDhD"}
|
|
@@ -241,3 +241,53 @@ export async function POST(request) {
|
|
|
241
241
|
return NextResponse.json({ error: "Failed to send password reset email" }, { status: 500 });
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
|
+
/**
|
|
245
|
+
* DELETE - Hard-delete a user from hazo_users (cascades to all related rows).
|
|
246
|
+
* Body: { user_id: string }
|
|
247
|
+
* Requires: admin_user_management permission (enforced by UI, not here — same
|
|
248
|
+
* pattern as PATCH/POST in this file which also don't re-auth).
|
|
249
|
+
*/
|
|
250
|
+
export async function DELETE(request) {
|
|
251
|
+
const logger = create_app_logger();
|
|
252
|
+
try {
|
|
253
|
+
const body = await request.json();
|
|
254
|
+
const { user_id } = body;
|
|
255
|
+
if (!user_id) {
|
|
256
|
+
return NextResponse.json({ error: "user_id is required" }, { status: 400 });
|
|
257
|
+
}
|
|
258
|
+
const hazoConnect = get_hazo_connect_instance();
|
|
259
|
+
const users_service = createCrudService(hazoConnect, "hazo_users");
|
|
260
|
+
// Verify user exists before deleting
|
|
261
|
+
const users = await users_service.findBy({ id: user_id });
|
|
262
|
+
if (!Array.isArray(users) || users.length === 0) {
|
|
263
|
+
return NextResponse.json({ error: "User not found" }, { status: 404 });
|
|
264
|
+
}
|
|
265
|
+
// Invalidate auth cache first
|
|
266
|
+
try {
|
|
267
|
+
const auth_config = get_auth_utility_config();
|
|
268
|
+
const auth_cache = get_auth_cache(auth_config.cache_max_users, auth_config.cache_ttl_minutes, auth_config.cache_max_age_minutes);
|
|
269
|
+
auth_cache.invalidate_user(user_id);
|
|
270
|
+
}
|
|
271
|
+
catch (_a) {
|
|
272
|
+
// Non-fatal
|
|
273
|
+
}
|
|
274
|
+
await users_service.deleteById(user_id);
|
|
275
|
+
logger.info("user_management_user_deleted", {
|
|
276
|
+
filename: get_filename(),
|
|
277
|
+
line_number: get_line_number(),
|
|
278
|
+
user_id,
|
|
279
|
+
});
|
|
280
|
+
return NextResponse.json({ success: true }, { status: 200 });
|
|
281
|
+
}
|
|
282
|
+
catch (error) {
|
|
283
|
+
const error_message = error instanceof Error ? error.message : "Unknown error";
|
|
284
|
+
const error_stack = error instanceof Error ? error.stack : undefined;
|
|
285
|
+
logger.error("user_management_user_delete_error", {
|
|
286
|
+
filename: get_filename(),
|
|
287
|
+
line_number: get_line_number(),
|
|
288
|
+
error_message,
|
|
289
|
+
error_stack,
|
|
290
|
+
});
|
|
291
|
+
return NextResponse.json({ error: "Failed to delete user" }, { status: 500 });
|
|
292
|
+
}
|
|
293
|
+
}
|
package/dist/server-lib.d.ts
CHANGED
|
@@ -24,9 +24,6 @@ export { get_oauth_config, is_google_oauth_enabled, is_email_password_enabled, }
|
|
|
24
24
|
export type { OAuthConfig } from "./lib/oauth_config.server";
|
|
25
25
|
export { get_branding_config, is_branding_enabled, is_allowed_logo_format, get_max_logo_size_bytes, } from "./lib/branding_config.server.js";
|
|
26
26
|
export type { FirmBrandingConfig } from "./lib/branding_config.server";
|
|
27
|
-
export { get_otp_config, hazo_auth_otp_session_ttl_seconds, OTP_CONFIG_DEFAULTS } from "./lib/otp_config.server.js";
|
|
28
|
-
export type { OtpConfig } from "./lib/otp_config.server";
|
|
29
|
-
export { request_email_otp, verify_email_otp } from "./lib/services/otp_service.js";
|
|
30
27
|
export { create_sqlite_hazo_connect } from "./lib/hazo_connect_setup.js";
|
|
31
28
|
export { get_hazo_connect_instance } from "./lib/hazo_connect_instance.server.js";
|
|
32
29
|
export { create_app_logger } from "./lib/app_logger.js";
|
package/dist/server-lib.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server-lib.d.ts","sourceRoot":"","sources":["../src/server-lib.ts"],"names":[],"mappings":"AAYA,OAAO,aAAa,CAAC;AAGrB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAGrF,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"server-lib.d.ts","sourceRoot":"","sources":["../src/server-lib.ts"],"names":[],"mappings":"AAYA,OAAO,aAAa,CAAC;AAGrB,cAAc,kBAAkB,CAAC;AAGjC,cAAc,sBAAsB,CAAC;AACrC,OAAO,EAAE,2BAA2B,EAAE,MAAM,wCAAwC,CAAC;AAGrF,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,kBAAkB,EAClB,gBAAgB,EAChB,mBAAmB,GACpB,MAAM,mCAAmC,CAAC;AAG3C,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,6BAA6B,EAAE,MAAM,wCAAwC,CAAC;AACvF,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAC;AACjF,OAAO,EAAE,2BAA2B,EAAE,MAAM,sCAAsC,CAAC;AACnF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uCAAuC,CAAC;AACrF,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,gCAAgC,EAAE,MAAM,2CAA2C,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EACL,gBAAgB,EAChB,uBAAuB,EACvB,yBAAyB,GAC1B,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,sBAAsB,EACtB,uBAAuB,GACxB,MAAM,8BAA8B,CAAC;AACtC,YAAY,EAAE,kBAAkB,EAAE,MAAM,8BAA8B,CAAC;AAGvE,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAG/E,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAGrD,OAAO,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAC;AACtE,YAAY,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAC;AAC5E,cAAc,+BAA+B,CAAC"}
|
package/dist/server-lib.js
CHANGED
|
@@ -37,8 +37,6 @@ export { get_user_fields_config } from "./lib/user_fields_config.server.js";
|
|
|
37
37
|
export { get_file_types_config } from "./lib/file_types_config.server.js";
|
|
38
38
|
export { get_oauth_config, is_google_oauth_enabled, is_email_password_enabled, } from "./lib/oauth_config.server.js";
|
|
39
39
|
export { get_branding_config, is_branding_enabled, is_allowed_logo_format, get_max_logo_size_bytes, } from "./lib/branding_config.server.js";
|
|
40
|
-
export { get_otp_config, hazo_auth_otp_session_ttl_seconds, OTP_CONFIG_DEFAULTS } from "./lib/otp_config.server.js";
|
|
41
|
-
export { request_email_otp, verify_email_otp } from "./lib/services/otp_service.js";
|
|
42
40
|
// section: hazo_connect_exports
|
|
43
41
|
export { create_sqlite_hazo_connect } from "./lib/hazo_connect_setup.js";
|
|
44
42
|
export { get_hazo_connect_instance } from "./lib/hazo_connect_instance.server.js";
|
|
@@ -50,6 +50,6 @@ export type ForgotPasswordPageProps = {
|
|
|
50
50
|
* @param props - Optional visual and navigation customization props
|
|
51
51
|
* @returns Server-rendered forgot password page
|
|
52
52
|
*/
|
|
53
|
-
export default function ForgotPasswordPage(
|
|
53
|
+
export default function ForgotPasswordPage({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, }?: ForgotPasswordPageProps): import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
export { ForgotPasswordPage };
|
|
55
55
|
//# sourceMappingURL=forgot_password.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/server_pages/forgot_password.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"forgot_password.d.ts","sourceRoot":"","sources":["../../src/server_pages/forgot_password.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AASrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG;IACpC;;;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;;;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,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,YAAgD,EAChD,aAAkD,GACnD,GAAE,uBAA4B,2CAkC9B;AAGD,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -5,6 +5,7 @@ import "server-only";
|
|
|
5
5
|
// section: imports
|
|
6
6
|
import { get_forgot_password_config } from "../lib/forgot_password_config.server.js";
|
|
7
7
|
import { ForgotPasswordClientWrapper } from "./forgot_password_client_wrapper.js";
|
|
8
|
+
import { readStrings } from "../strings.js";
|
|
8
9
|
import { AuthPageShell } from "../components/layouts/shared/components/auth_page_shell.js";
|
|
9
10
|
import { DEFAULT_FORGOT_PASSWORD } from "../lib/config/default_config.js";
|
|
10
11
|
// section: component
|
|
@@ -31,16 +32,21 @@ import { DEFAULT_FORGOT_PASSWORD } from "../lib/config/default_config.js";
|
|
|
31
32
|
* @param props - Optional visual and navigation customization props
|
|
32
33
|
* @returns Server-rendered forgot password page
|
|
33
34
|
*/
|
|
34
|
-
export default function ForgotPasswordPage(
|
|
35
|
-
const { image_src, image_alt, image_background_color, sign_in_path = DEFAULT_FORGOT_PASSWORD.loginPath, sign_in_label = DEFAULT_FORGOT_PASSWORD.loginLabel, } = props !== null && props !== void 0 ? props : {};
|
|
35
|
+
export default function ForgotPasswordPage({ image_src, image_alt, image_background_color, sign_in_path = DEFAULT_FORGOT_PASSWORD.loginPath, sign_in_label = DEFAULT_FORGOT_PASSWORD.loginLabel, } = {}) {
|
|
36
36
|
// Load configuration from INI file (with defaults including asset images)
|
|
37
37
|
const config = get_forgot_password_config();
|
|
38
|
+
const strings = readStrings();
|
|
39
|
+
const fp_strings = strings.forgot_password;
|
|
38
40
|
// Use props if provided, otherwise fall back to config (which includes default asset image)
|
|
39
41
|
const finalImageSrc = image_src || config.imageSrc;
|
|
40
42
|
const finalImageAlt = image_alt || config.imageAlt;
|
|
41
43
|
const finalImageBackgroundColor = image_background_color || config.imageBackgroundColor;
|
|
42
44
|
// Pass serializable config to client wrapper, wrapped in AuthPageShell for navbar support
|
|
43
|
-
return (_jsx(AuthPageShell, { children: _jsx(ForgotPasswordClientWrapper, { image_src: finalImageSrc, image_alt: finalImageAlt, image_background_color: finalImageBackgroundColor, 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
|
|
45
|
+
return (_jsx(AuthPageShell, { children: _jsx(ForgotPasswordClientWrapper, { image_src: finalImageSrc, image_alt: finalImageAlt, image_background_color: finalImageBackgroundColor, 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, labels: {
|
|
46
|
+
heading: fp_strings.title,
|
|
47
|
+
subHeading: fp_strings.subtitle,
|
|
48
|
+
submitButton: fp_strings.ctaText,
|
|
49
|
+
} }) }));
|
|
44
50
|
}
|
|
45
51
|
// Named export for direct imports
|
|
46
52
|
export { ForgotPasswordPage };
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { ForgotPasswordConfig } from "../lib/forgot_password_config.server";
|
|
2
|
+
import type { LayoutLabelOverrides } from "../components/layouts/shared/config/layout_customization";
|
|
2
3
|
import type { StaticImageData } from "next/image";
|
|
3
4
|
export type ForgotPasswordClientWrapperProps = Omit<ForgotPasswordConfig, 'imageSrc' | 'imageAlt' | 'imageBackgroundColor'> & {
|
|
4
5
|
image_src: string | StaticImageData;
|
|
@@ -6,10 +7,11 @@ export type ForgotPasswordClientWrapperProps = Omit<ForgotPasswordConfig, 'image
|
|
|
6
7
|
image_background_color: string;
|
|
7
8
|
sign_in_path: string;
|
|
8
9
|
sign_in_label: string;
|
|
10
|
+
labels?: LayoutLabelOverrides;
|
|
9
11
|
};
|
|
10
12
|
/**
|
|
11
13
|
* Client wrapper for ForgotPasswordLayout
|
|
12
14
|
* Initializes hazo_connect data client on client side and passes config from server
|
|
13
15
|
*/
|
|
14
|
-
export declare function ForgotPasswordClientWrapper({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, }: ForgotPasswordClientWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function ForgotPasswordClientWrapper({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, labels, }: ForgotPasswordClientWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
15
17
|
//# sourceMappingURL=forgot_password_client_wrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"forgot_password_client_wrapper.d.ts","sourceRoot":"","sources":["../../src/server_pages/forgot_password_client_wrapper.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;
|
|
1
|
+
{"version":3,"file":"forgot_password_client_wrapper.d.ts","sourceRoot":"","sources":["../../src/server_pages/forgot_password_client_wrapper.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAGrG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,gCAAgC,GAAG,IAAI,CAAC,oBAAoB,EAAE,UAAU,GAAG,UAAU,GAAG,sBAAsB,CAAC,GAAG;IAC5H,SAAS,EAAE,MAAM,GAAG,eAAe,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,EAAE,MAAM,CAAC;IAC/B,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAGF;;;GAGG;AACH,wBAAgB,2BAA2B,CAAC,EAC1C,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,YAAY,EACZ,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,MAAM,GACP,EAAE,gCAAgC,2CAoClC"}
|
|
@@ -11,7 +11,7 @@ import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup.js";
|
|
|
11
11
|
* Client wrapper for ForgotPasswordLayout
|
|
12
12
|
* Initializes hazo_connect data client on client side and passes config from server
|
|
13
13
|
*/
|
|
14
|
-
export function ForgotPasswordClientWrapper({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, }) {
|
|
14
|
+
export function ForgotPasswordClientWrapper({ image_src, image_alt, image_background_color, sign_in_path, sign_in_label, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, labels, }) {
|
|
15
15
|
const [dataClient, setDataClient] = useState(null);
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
// Initialize hazo_connect on client side
|
|
@@ -23,5 +23,5 @@ export function ForgotPasswordClientWrapper({ image_src, image_alt, image_backgr
|
|
|
23
23
|
if (!dataClient) {
|
|
24
24
|
return (_jsx("div", { className: "cls_forgot_password_page_loading flex items-center justify-center min-h-screen", children: _jsx("div", { className: "text-slate-600 animate-pulse", children: "Loading..." }) }));
|
|
25
25
|
}
|
|
26
|
-
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: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath }));
|
|
26
|
+
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: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath, labels: labels }));
|
|
27
27
|
}
|
|
@@ -10,4 +10,6 @@ export type { ForgotPasswordPageProps } from "./forgot_password";
|
|
|
10
10
|
export type { ResetPasswordPageProps } from "./reset_password";
|
|
11
11
|
export type { VerifyEmailPageProps } from "./verify_email";
|
|
12
12
|
export type { MySettingsPageProps } from "./my_settings";
|
|
13
|
+
export { default as OTPPage } from "./otp.js";
|
|
14
|
+
export type { OTPPageProps } from "./otp";
|
|
13
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server_pages/index.ts"],"names":[],"mappings":"AAEA,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,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,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,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/server_pages/index.ts"],"names":[],"mappings":"AAEA,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,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAClE,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC5D,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,uBAAuB,EAAE,MAAM,mBAAmB,CAAC;AACjE,YAAY,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC/D,YAAY,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AAC3D,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,OAAO,IAAI,OAAO,EAAE,MAAM,OAAO,CAAC;AAC3C,YAAY,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC"}
|
|
@@ -5,3 +5,4 @@ export { default as ForgotPasswordPage } from "./forgot_password.js";
|
|
|
5
5
|
export { default as ResetPasswordPage } from "./reset_password.js";
|
|
6
6
|
export { default as VerifyEmailPage } from "./verify_email.js";
|
|
7
7
|
export { default as MySettingsPage } from "./my_settings.js";
|
|
8
|
+
export { default as OTPPage } from "./otp.js";
|
|
@@ -52,6 +52,6 @@ export type LoginPageProps = {
|
|
|
52
52
|
* @param props - Optional visual customization props
|
|
53
53
|
* @returns Server-rendered login page
|
|
54
54
|
*/
|
|
55
|
-
export default function LoginPage(
|
|
55
|
+
export default function LoginPage({ image_src, image_alt, image_background_color, layout, }?: LoginPageProps): import("react/jsx-runtime").JSX.Element;
|
|
56
56
|
export { LoginPage };
|
|
57
57
|
//# sourceMappingURL=login.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/server_pages/login.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"login.d.ts","sourceRoot":"","sources":["../../src/server_pages/login.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAUrB,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,cAAc,GAAG;IAC3B;;;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;;;;;;;;;;OAUG;IACH,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;CACrC,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,MAAM,CAAC,OAAO,UAAU,SAAS,CAAC,EAChC,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,MAAqB,GACtB,GAAE,cAAmB,2CAsErB;AAGD,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
|
@@ -6,6 +6,7 @@ import "server-only";
|
|
|
6
6
|
import { get_login_config } from "../lib/login_config.server.js";
|
|
7
7
|
import { get_navbar_config } from "../lib/navbar_config.server.js";
|
|
8
8
|
import { LoginClientWrapper } from "./login_client_wrapper.js";
|
|
9
|
+
import { readStrings } from "../strings.js";
|
|
9
10
|
import { AuthPageShell } from "../components/layouts/shared/components/auth_page_shell.js";
|
|
10
11
|
import { FloatingHomeLink } from "../components/layouts/shared/components/floating_home_link.js";
|
|
11
12
|
// section: component
|
|
@@ -32,10 +33,12 @@ import { FloatingHomeLink } from "../components/layouts/shared/components/floati
|
|
|
32
33
|
* @param props - Optional visual customization props
|
|
33
34
|
* @returns Server-rendered login page
|
|
34
35
|
*/
|
|
35
|
-
export default function LoginPage(
|
|
36
|
-
const { image_src, image_alt, image_background_color, layout = "two_column", } = props !== null && props !== void 0 ? props : {};
|
|
36
|
+
export default function LoginPage({ image_src, image_alt, image_background_color, layout = "two_column", } = {}) {
|
|
37
37
|
// Load configuration from INI file (with defaults including asset images)
|
|
38
38
|
const config = get_login_config();
|
|
39
|
+
// Resolve strings for heading/subheading/ctaText
|
|
40
|
+
const strings = readStrings();
|
|
41
|
+
const login_strings = strings.login;
|
|
39
42
|
// Use props if provided, otherwise fall back to config (which includes default asset image)
|
|
40
43
|
const finalImageSrc = image_src || config.imageSrc;
|
|
41
44
|
const finalImageAlt = image_alt || config.imageAlt;
|
|
@@ -45,7 +48,13 @@ export default function LoginPage(props) {
|
|
|
45
48
|
enable_email_password: config.oauth.enable_email_password,
|
|
46
49
|
google_button_text: config.oauth.google_button_text,
|
|
47
50
|
oauth_divider_text: config.oauth.oauth_divider_text,
|
|
48
|
-
|
|
51
|
+
enable_facebook_oauth: config.oauth.enable_facebook_oauth,
|
|
52
|
+
facebook_button_text: config.oauth.facebook_button_text,
|
|
53
|
+
}, layout: layout, labels: {
|
|
54
|
+
heading: login_strings.title,
|
|
55
|
+
subHeading: login_strings.subtitle,
|
|
56
|
+
submitButton: login_strings.ctaText,
|
|
57
|
+
} }));
|
|
49
58
|
// form_only mode: skip AuthPageShell so the consumer's own page chrome
|
|
50
59
|
// (e.g. a split-panel AuthLayout) hosts the form without our standalone
|
|
51
60
|
// wrapper interfering. Two-column mode keeps the existing AuthPageShell
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { LoginConfig } from "../lib/login_config.server";
|
|
2
2
|
import type { OAuthLayoutConfig } from "../components/layouts/login/index";
|
|
3
|
+
import type { LayoutLabelOverrides } from "../components/layouts/shared/config/layout_customization";
|
|
3
4
|
import type { StaticImageData } from "next/image";
|
|
4
5
|
export type LoginClientWrapperProps = Omit<LoginConfig, 'imageSrc' | 'imageAlt' | 'imageBackgroundColor' | 'oauth' | 'showCreateAccountLink'> & {
|
|
5
6
|
image_src?: string | StaticImageData;
|
|
@@ -11,10 +12,12 @@ export type LoginClientWrapperProps = Omit<LoginConfig, 'imageSrc' | 'imageAlt'
|
|
|
11
12
|
oauth?: OAuthLayoutConfig;
|
|
12
13
|
/** Layout mode — see LoginLayoutProps.layout. Default `"two_column"`. */
|
|
13
14
|
layout?: "two_column" | "form_only";
|
|
15
|
+
/** String overrides for page heading, subheading, and submit button. */
|
|
16
|
+
labels?: LayoutLabelOverrides;
|
|
14
17
|
};
|
|
15
18
|
/**
|
|
16
19
|
* Client wrapper for LoginLayout
|
|
17
20
|
* Initializes hazo_connect data client on client side and passes config from server
|
|
18
21
|
*/
|
|
19
|
-
export declare function LoginClientWrapper({ image_src, image_alt, image_background_color, redirectRoute, successMessage, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, forgotPasswordPath, forgotPasswordLabel, createAccountPath, createAccountLabel, showCreateAccountLink, oauth,
|
|
22
|
+
export declare function LoginClientWrapper({ image_src, image_alt, image_background_color, redirectRoute, successMessage, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, forgotPasswordPath, forgotPasswordLabel, createAccountPath, createAccountLabel, showCreateAccountLink, oauth, layout, labels, }: LoginClientWrapperProps): import("react/jsx-runtime").JSX.Element;
|
|
20
23
|
//# sourceMappingURL=login_client_wrapper.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"login_client_wrapper.d.ts","sourceRoot":"","sources":["../../src/server_pages/login_client_wrapper.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;
|
|
1
|
+
{"version":3,"file":"login_client_wrapper.d.ts","sourceRoot":"","sources":["../../src/server_pages/login_client_wrapper.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAC3E,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0DAA0D,CAAC;AAGrG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE,UAAU,GAAG,UAAU,GAAG,sBAAsB,GAAG,OAAO,GAAG,uBAAuB,CAAC,GAAG;IAC9I,SAAS,CAAC,EAAE,MAAM,GAAG,eAAe,CAAC;IACrC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,sDAAsD;IACtD,qBAAqB,CAAC,EAAE,OAAO,CAAC;IAChC,0BAA0B;IAC1B,KAAK,CAAC,EAAE,iBAAiB,CAAC;IAC1B,yEAAyE;IACzE,MAAM,CAAC,EAAE,YAAY,GAAG,WAAW,CAAC;IACpC,wEAAwE;IACxE,MAAM,CAAC,EAAE,oBAAoB,CAAC;CAC/B,CAAC;AAGF;;;GAGG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,SAAS,EACT,SAAS,EACT,sBAAsB,EACtB,aAAa,EACb,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,oBAAoB,EACpB,qBAAqB,EACrB,cAAc,EACd,kBAAkB,EAClB,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,qBAA4B,EAC5B,KAAK,EACL,MAAqB,EACrB,MAAM,GACP,EAAE,uBAAuB,2CA2CzB"}
|
|
@@ -11,7 +11,7 @@ import { create_sqlite_hazo_connect } from "../lib/hazo_connect_setup.js";
|
|
|
11
11
|
* Client wrapper for LoginLayout
|
|
12
12
|
* Initializes hazo_connect data client on client side and passes config from server
|
|
13
13
|
*/
|
|
14
|
-
export function LoginClientWrapper({ image_src, image_alt, image_background_color, redirectRoute, successMessage, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, forgotPasswordPath, forgotPasswordLabel, createAccountPath, createAccountLabel, showCreateAccountLink = true, oauth,
|
|
14
|
+
export function LoginClientWrapper({ image_src, image_alt, image_background_color, redirectRoute, successMessage, alreadyLoggedInMessage, showLogoutButton, showReturnHomeButton, returnHomeButtonLabel, returnHomePath, forgotPasswordPath, forgotPasswordLabel, createAccountPath, createAccountLabel, showCreateAccountLink = true, oauth, layout = "two_column", labels, }) {
|
|
15
15
|
const [dataClient, setDataClient] = useState(null);
|
|
16
16
|
useEffect(() => {
|
|
17
17
|
// Initialize hazo_connect on client side
|
|
@@ -23,5 +23,5 @@ export function LoginClientWrapper({ image_src, image_alt, image_background_colo
|
|
|
23
23
|
if (!dataClient) {
|
|
24
24
|
return (_jsx("div", { className: "cls_login_page_loading flex items-center justify-center min-h-screen", children: _jsx("div", { className: "text-slate-600 animate-pulse", children: "Loading..." }) }));
|
|
25
25
|
}
|
|
26
|
-
return (_jsx(LoginLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, redirectRoute: redirectRoute, successMessage: successMessage, alreadyLoggedInMessage: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath, forgot_password_path: forgotPasswordPath, forgot_password_label: forgotPasswordLabel, create_account_path: createAccountPath, create_account_label: createAccountLabel, show_create_account_link: showCreateAccountLink, oauth: oauth,
|
|
26
|
+
return (_jsx(LoginLayout, { image_src: image_src, image_alt: image_alt, image_background_color: image_background_color, data_client: dataClient, redirectRoute: redirectRoute, successMessage: successMessage, alreadyLoggedInMessage: alreadyLoggedInMessage, showLogoutButton: showLogoutButton, showReturnHomeButton: showReturnHomeButton, returnHomeButtonLabel: returnHomeButtonLabel, returnHomePath: returnHomePath, forgot_password_path: forgotPasswordPath, forgot_password_label: forgotPasswordLabel, create_account_path: createAccountPath, create_account_label: createAccountLabel, show_create_account_link: showCreateAccountLink, oauth: oauth, layout: layout, labels: labels }));
|
|
27
27
|
}
|
|
@@ -50,6 +50,6 @@ export type MySettingsPageProps = {
|
|
|
50
50
|
* @param props - Optional className for custom styling
|
|
51
51
|
* @returns Server-rendered my settings component
|
|
52
52
|
*/
|
|
53
|
-
export default function MySettingsPage(
|
|
53
|
+
export default function MySettingsPage({ className, }?: MySettingsPageProps): import("react/jsx-runtime").JSX.Element;
|
|
54
54
|
export { MySettingsPage };
|
|
55
55
|
//# sourceMappingURL=my_settings.d.ts.map
|
|
@@ -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,
|
|
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,2CAgC1B;AAGD,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -52,8 +52,7 @@ import { AuthPageShell } from "../components/layouts/shared/components/auth_page
|
|
|
52
52
|
* @param props - Optional className for custom styling
|
|
53
53
|
* @returns Server-rendered my settings component
|
|
54
54
|
*/
|
|
55
|
-
export default function MySettingsPage(
|
|
56
|
-
const { className } = props !== null && props !== void 0 ? props : {};
|
|
55
|
+
export default function MySettingsPage({ className, } = {}) {
|
|
57
56
|
// Load configuration from INI file (with defaults)
|
|
58
57
|
const config = get_my_settings_config();
|
|
59
58
|
// Render layout with all server-initialized configuration, wrapped in AuthPageShell for navbar support
|
|
@@ -12,9 +12,23 @@ export type OTPPageProps = {
|
|
|
12
12
|
};
|
|
13
13
|
/**
|
|
14
14
|
* Page heading passed through to OTPLayout.
|
|
15
|
-
*
|
|
15
|
+
* Falls back to HazoAuthStringsProvider → DEFAULT_STRINGS.
|
|
16
16
|
*/
|
|
17
17
|
title?: string;
|
|
18
|
+
/**
|
|
19
|
+
* Page subtitle. Falls back to HazoAuthStringsProvider → DEFAULT_STRINGS.
|
|
20
|
+
*/
|
|
21
|
+
subtitle?: string;
|
|
22
|
+
/**
|
|
23
|
+
* Submit button label. Falls back to HazoAuthStringsProvider → DEFAULT_STRINGS.
|
|
24
|
+
*/
|
|
25
|
+
ctaText?: string;
|
|
26
|
+
/**
|
|
27
|
+
* Optional theme that controls visual appearance and layout mode.
|
|
28
|
+
* When `theme.layout` is `"split"`, activates the two-column split layout
|
|
29
|
+
* with the brand panel on the left.
|
|
30
|
+
*/
|
|
31
|
+
theme?: import("../theme/theme_types").HazoAuthTheme;
|
|
18
32
|
};
|
|
19
33
|
/**
|
|
20
34
|
* Zero-config OTPPage server component
|
|
@@ -37,6 +51,6 @@ export type OTPPageProps = {
|
|
|
37
51
|
* @param props - Optional searchParams and title
|
|
38
52
|
* @returns Server-rendered OTP sign-in page
|
|
39
53
|
*/
|
|
40
|
-
export default function OTPPage({ searchParams, title, }?: OTPPageProps): Promise<React.ReactElement>;
|
|
54
|
+
export default function OTPPage({ searchParams, title, subtitle, ctaText, theme, }?: OTPPageProps): Promise<React.ReactElement>;
|
|
41
55
|
export { OTPPage };
|
|
42
56
|
//# sourceMappingURL=otp.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"otp.d.ts","sourceRoot":"","sources":["../../src/server_pages/otp.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"otp.d.ts","sourceRoot":"","sources":["../../src/server_pages/otp.tsx"],"names":[],"mappings":"AAEA,OAAO,aAAa,CAAC;AAGrB,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,MAAM,MAAM,YAAY,GAAG;IACzB;;;OAGG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC;IAEtE;;;OAGG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB;;OAEG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,sBAAsB,EAAE,aAAa,CAAC;CACtD,CAAC;AAGF;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAA8B,OAAO,CAAC,EACpC,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,OAAO,EACP,KAAK,GACN,GAAE,YAAiB,GAAG,OAAO,CAAC,KAAK,CAAC,YAAY,CAAC,CAyBjD;AAGD,OAAO,EAAE,OAAO,EAAE,CAAC"}
|