hazo_auth 1.6.7 → 3.0.1
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 +114 -14
- package/SETUP_CHECKLIST.md +65 -1
- package/dist/components/layouts/email_verification/hooks/use_email_verification.d.ts.map +1 -1
- package/dist/components/layouts/email_verification/hooks/use_email_verification.js +5 -3
- package/dist/components/layouts/email_verification/index.d.ts +2 -1
- package/dist/components/layouts/email_verification/index.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.d.ts.map +1 -1
- package/dist/components/layouts/forgot_password/hooks/use_forgot_password_form.js +3 -1
- package/dist/components/layouts/forgot_password/index.d.ts +2 -1
- package/dist/components/layouts/forgot_password/index.d.ts.map +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.d.ts.map +1 -1
- package/dist/components/layouts/login/hooks/use_login_form.js +3 -1
- package/dist/components/layouts/login/index.d.ts +2 -1
- package/dist/components/layouts/login/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_dialog.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_dialog.js +3 -1
- package/dist/components/layouts/my_settings/components/profile_picture_library_tab.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/components/profile_picture_library_tab.js +4 -2
- 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 +7 -5
- package/dist/components/layouts/my_settings/index.d.ts +2 -1
- package/dist/components/layouts/my_settings/index.d.ts.map +1 -1
- package/dist/components/layouts/my_settings/index.js +3 -2
- package/dist/components/layouts/register/hooks/use_register_form.d.ts.map +1 -1
- package/dist/components/layouts/register/hooks/use_register_form.js +3 -1
- package/dist/components/layouts/register/index.d.ts +2 -1
- package/dist/components/layouts/register/index.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.d.ts.map +1 -1
- package/dist/components/layouts/reset_password/hooks/use_reset_password_form.js +4 -2
- package/dist/components/layouts/reset_password/index.d.ts +2 -1
- package/dist/components/layouts/reset_password/index.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts +2 -1
- package/dist/components/layouts/shared/components/already_logged_in_guard.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/logout_button.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/logout_button.js +3 -1
- package/dist/components/layouts/shared/components/profile_pic_menu.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/profile_pic_menu.js +8 -4
- package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts +2 -1
- package/dist/components/layouts/shared/components/two_column_auth_layout.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/visual_panel.d.ts +2 -1
- package/dist/components/layouts/shared/components/visual_panel.d.ts.map +1 -1
- package/dist/components/layouts/shared/components/visual_panel.js +2 -1
- package/dist/components/layouts/shared/hooks/use_auth_status.d.ts.map +1 -1
- package/dist/components/layouts/shared/hooks/use_auth_status.js +4 -2
- package/dist/components/layouts/shared/hooks/use_hazo_auth.d.ts.map +1 -1
- package/dist/components/layouts/shared/hooks/use_hazo_auth.js +4 -2
- package/dist/components/layouts/shared/index.d.ts +0 -2
- package/dist/components/layouts/shared/index.d.ts.map +1 -1
- package/dist/components/layouts/shared/index.js +2 -2
- package/dist/components/layouts/user_management/components/roles_matrix.d.ts.map +1 -1
- package/dist/components/layouts/user_management/components/roles_matrix.js +8 -6
- package/dist/components/layouts/user_management/index.d.ts.map +1 -1
- package/dist/components/layouts/user_management/index.js +15 -13
- package/dist/contexts/hazo_auth_config.d.ts +18 -0
- package/dist/contexts/hazo_auth_config.d.ts.map +1 -0
- package/dist/contexts/hazo_auth_config.js +10 -0
- package/dist/contexts/hazo_auth_provider.d.ts +73 -0
- package/dist/contexts/hazo_auth_provider.d.ts.map +1 -0
- package/dist/contexts/hazo_auth_provider.js +82 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/lib/config/default_config.d.ts +237 -0
- package/dist/lib/config/default_config.d.ts.map +1 -0
- package/dist/lib/config/default_config.js +159 -0
- package/dist/lib/email_verification_config.server.d.ts +4 -0
- package/dist/lib/email_verification_config.server.d.ts.map +1 -1
- package/dist/lib/email_verification_config.server.js +12 -0
- package/dist/lib/forgot_password_config.server.d.ts +4 -0
- package/dist/lib/forgot_password_config.server.d.ts.map +1 -1
- package/dist/lib/forgot_password_config.server.js +12 -0
- package/dist/lib/login_config.server.d.ts +4 -0
- package/dist/lib/login_config.server.d.ts.map +1 -1
- package/dist/lib/login_config.server.js +10 -0
- package/dist/lib/password_requirements_config.server.d.ts +1 -1
- package/dist/lib/password_requirements_config.server.d.ts.map +1 -1
- package/dist/lib/password_requirements_config.server.js +8 -7
- package/dist/lib/register_config.server.d.ts +4 -0
- package/dist/lib/register_config.server.d.ts.map +1 -1
- package/dist/lib/register_config.server.js +10 -0
- package/dist/lib/reset_password_config.server.d.ts +4 -0
- package/dist/lib/reset_password_config.server.d.ts.map +1 -1
- package/dist/lib/reset_password_config.server.js +10 -0
- package/dist/page_components/forgot_password.d.ts.map +1 -1
- package/dist/page_components/forgot_password.js +14 -0
- package/dist/page_components/login.d.ts +4 -0
- package/dist/page_components/login.d.ts.map +1 -1
- package/dist/page_components/login.js +14 -0
- package/dist/page_components/register.d.ts.map +1 -1
- package/dist/page_components/register.js +14 -0
- package/dist/page_components/reset_password.d.ts.map +1 -1
- package/dist/page_components/reset_password.js +14 -0
- package/dist/page_components/verify_email.d.ts.map +1 -1
- package/dist/page_components/verify_email.js +14 -0
- package/dist/pages/forgot_password.d.ts +52 -0
- package/dist/pages/forgot_password.d.ts.map +1 -0
- package/dist/pages/forgot_password.js +41 -0
- package/dist/pages/index.d.ts +33 -0
- package/dist/pages/index.d.ts.map +1 -0
- package/dist/pages/index.js +28 -0
- package/dist/pages/login.d.ts +43 -0
- package/dist/pages/login.d.ts.map +1 -0
- package/dist/pages/login.js +45 -0
- package/dist/pages/my_settings.d.ts +54 -0
- package/dist/pages/my_settings.d.ts.map +1 -0
- package/dist/pages/my_settings.js +57 -0
- package/dist/pages/register.d.ts +44 -0
- package/dist/pages/register.d.ts.map +1 -0
- package/dist/pages/register.js +46 -0
- package/dist/pages/reset_password.d.ts +43 -0
- package/dist/pages/reset_password.d.ts.map +1 -0
- package/dist/pages/reset_password.js +42 -0
- package/dist/pages/verify_email.d.ts +52 -0
- package/dist/pages/verify_email.d.ts.map +1 -0
- package/dist/pages/verify_email.js +41 -0
- package/dist/server_pages/forgot_password.d.ts +53 -0
- package/dist/server_pages/forgot_password.d.ts.map +1 -0
- package/dist/server_pages/forgot_password.js +40 -0
- package/dist/server_pages/forgot_password_client_wrapper.d.ts +15 -0
- package/dist/server_pages/forgot_password_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/forgot_password_client_wrapper.js +27 -0
- package/dist/server_pages/index.d.ts +13 -0
- package/dist/server_pages/index.d.ts.map +1 -0
- package/dist/server_pages/index.js +7 -0
- package/dist/server_pages/login.d.ts +43 -0
- package/dist/server_pages/login.d.ts.map +1 -0
- package/dist/server_pages/login.js +39 -0
- package/dist/server_pages/login_client_wrapper.d.ts +13 -0
- package/dist/server_pages/login_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/login_client_wrapper.js +29 -0
- package/dist/server_pages/my_settings.d.ts +53 -0
- package/dist/server_pages/my_settings.d.ts.map +1 -0
- package/dist/server_pages/my_settings.js +57 -0
- package/dist/server_pages/register.d.ts +45 -0
- package/dist/server_pages/register.d.ts.map +1 -0
- package/dist/server_pages/register.js +41 -0
- package/dist/server_pages/register_client_wrapper.d.ts +13 -0
- package/dist/server_pages/register_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/register_client_wrapper.js +27 -0
- package/dist/server_pages/reset_password.d.ts +44 -0
- package/dist/server_pages/reset_password.d.ts.map +1 -0
- package/dist/server_pages/reset_password.js +40 -0
- package/dist/server_pages/reset_password_client_wrapper.d.ts +13 -0
- package/dist/server_pages/reset_password_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/reset_password_client_wrapper.js +27 -0
- package/dist/server_pages/verify_email.d.ts +53 -0
- package/dist/server_pages/verify_email.d.ts.map +1 -0
- package/dist/server_pages/verify_email.js +40 -0
- package/dist/server_pages/verify_email_client_wrapper.d.ts +15 -0
- package/dist/server_pages/verify_email_client_wrapper.d.ts.map +1 -0
- package/dist/server_pages/verify_email_client_wrapper.js +27 -0
- package/package.json +34 -10
package/README.md
CHANGED
|
@@ -2,9 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
A reusable authentication UI component package powered by Next.js, TailwindCSS, and shadcn. It integrates `hazo_config` for configuration management and `hazo_connect` for data access, enabling future components to stay aligned with platform conventions.
|
|
4
4
|
|
|
5
|
-
### What's New
|
|
5
|
+
### What's New in v2.0 🚀
|
|
6
6
|
|
|
7
|
-
- **
|
|
7
|
+
**Zero-Config Server Components** - Authentication pages now work out-of-the-box with ZERO configuration required!
|
|
8
|
+
|
|
9
|
+
- ✅ **True "Drop In and Use"** - Pages initialize everything server-side, no loading state
|
|
10
|
+
- ✅ **Better Performance** - Smaller JS bundles, faster page loads, immediate rendering
|
|
11
|
+
- ✅ **Flexible API Paths** - Customize endpoints globally via `HazoAuthProvider` context
|
|
12
|
+
- ✅ **Embeddable Components** - MySettings and UserManagement adapt to any layout
|
|
13
|
+
- ✅ **Sensible Defaults** - INI files are now optional, defaults built-in
|
|
14
|
+
|
|
15
|
+
**Migrating from v1.x?** See [MIGRATION.md](./MIGRATION.md) for a complete upgrade guide.
|
|
16
|
+
|
|
17
|
+
### Also Includes (v1.6.6+)
|
|
18
|
+
|
|
19
|
+
- **JWT Session Tokens for Edge-Compatible Authentication**: Secure Edge Runtime authentication in Next.js proxy/middleware files. See [Proxy/Middleware Authentication](#proxymiddleware-authentication) for details.
|
|
8
20
|
|
|
9
21
|
## Table of Contents
|
|
10
22
|
|
|
@@ -63,25 +75,113 @@ npx hazo_auth validate # Check your setup and configuration
|
|
|
63
75
|
npx hazo_auth --help # Show all commands
|
|
64
76
|
```
|
|
65
77
|
|
|
66
|
-
### Using Zero-Config Page Components
|
|
78
|
+
### Using Zero-Config Page Components (v2.0+)
|
|
79
|
+
|
|
80
|
+
**NEW in v2.0:** All pages are now React Server Components that initialize everything on the server. No configuration, no loading state, no hassle!
|
|
81
|
+
|
|
82
|
+
```typescript
|
|
83
|
+
// app/login/page.tsx - That's literally it!
|
|
84
|
+
import { LoginPage } from "hazo_auth/pages/login";
|
|
85
|
+
|
|
86
|
+
export default function Page() {
|
|
87
|
+
return <LoginPage />;
|
|
88
|
+
}
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
**What happens behind the scenes:**
|
|
92
|
+
- ✅ Database connection initialized server-side via hazo_connect singleton
|
|
93
|
+
- ✅ Configuration loaded from hazo_auth_config.ini (or uses sensible defaults)
|
|
94
|
+
- ✅ All props automatically configured
|
|
95
|
+
- ✅ Page renders immediately - NO loading state!
|
|
96
|
+
|
|
97
|
+
**Available zero-config pages:**
|
|
98
|
+
|
|
99
|
+
| Page | Import | Description |
|
|
100
|
+
|------|--------|-------------|
|
|
101
|
+
| **LoginPage** | `hazo_auth/pages/login` | Login form with forgot password link |
|
|
102
|
+
| **RegisterPage** | `hazo_auth/pages/register` | Registration with password validation |
|
|
103
|
+
| **ForgotPasswordPage** | `hazo_auth/pages/forgot_password` | Request password reset email |
|
|
104
|
+
| **ResetPasswordPage** | `hazo_auth/pages/reset_password` | Set new password with token |
|
|
105
|
+
| **VerifyEmailPage** | `hazo_auth/pages/verify_email` | Email verification handler |
|
|
106
|
+
| **MySettingsPage** | `hazo_auth/pages/my_settings` | User profile and password change |
|
|
107
|
+
|
|
108
|
+
**Example - Complete Auth Flow:**
|
|
109
|
+
|
|
110
|
+
```typescript
|
|
111
|
+
// app/login/page.tsx
|
|
112
|
+
import { LoginPage } from "hazo_auth/pages/login";
|
|
113
|
+
export default function Page() {
|
|
114
|
+
return <LoginPage />;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// app/register/page.tsx
|
|
118
|
+
import { RegisterPage } from "hazo_auth/pages/register";
|
|
119
|
+
export default function Page() {
|
|
120
|
+
return <RegisterPage />;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
// app/settings/page.tsx
|
|
124
|
+
import { MySettingsPage } from "hazo_auth/pages/my_settings";
|
|
125
|
+
export default function Page() {
|
|
126
|
+
return <MySettingsPage />;
|
|
127
|
+
}
|
|
128
|
+
```
|
|
67
129
|
|
|
68
|
-
|
|
130
|
+
**Customizing Visual Appearance (Optional):**
|
|
69
131
|
|
|
70
132
|
```typescript
|
|
71
|
-
//
|
|
133
|
+
// All pages accept optional visual props
|
|
72
134
|
import { LoginPage } from "hazo_auth/pages/login";
|
|
73
|
-
|
|
135
|
+
|
|
136
|
+
export default function Page() {
|
|
137
|
+
return (
|
|
138
|
+
<LoginPage
|
|
139
|
+
image_src="/custom-login-image.jpg"
|
|
140
|
+
image_alt="My company logo"
|
|
141
|
+
image_background_color="#f0f0f0"
|
|
142
|
+
/>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
**Embedding MySettings in Your Dashboard:**
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
// MySettings is now container-agnostic!
|
|
151
|
+
import { MySettingsPage } from "hazo_auth/pages/my_settings";
|
|
152
|
+
|
|
153
|
+
export default function DashboardPage() {
|
|
154
|
+
return (
|
|
155
|
+
<DashboardLayout>
|
|
156
|
+
<Sidebar />
|
|
157
|
+
<main className="p-6">
|
|
158
|
+
<MySettingsPage className="max-w-4xl mx-auto" />
|
|
159
|
+
</main>
|
|
160
|
+
</DashboardLayout>
|
|
161
|
+
);
|
|
162
|
+
}
|
|
74
163
|
```
|
|
75
164
|
|
|
76
|
-
|
|
77
|
-
- `LoginPage` - Login form with sensible defaults
|
|
78
|
-
- `RegisterPage` - Registration with password requirements
|
|
79
|
-
- `ForgotPasswordPage` - Password reset request
|
|
80
|
-
- `ResetPasswordPage` - Set new password
|
|
81
|
-
- `VerifyEmailPage` - Email verification
|
|
82
|
-
- `MySettingsPage` - User profile and settings
|
|
165
|
+
**Custom API Paths:**
|
|
83
166
|
|
|
84
|
-
|
|
167
|
+
If you use custom API endpoints (not `/api/hazo_auth/`), wrap your app with `HazoAuthProvider`:
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
// app/layout.tsx
|
|
171
|
+
import { HazoAuthProvider } from "hazo_auth";
|
|
172
|
+
|
|
173
|
+
export default function RootLayout({ children }) {
|
|
174
|
+
return (
|
|
175
|
+
<html>
|
|
176
|
+
<body>
|
|
177
|
+
<HazoAuthProvider apiBasePath="/api/v1/auth">
|
|
178
|
+
{children}
|
|
179
|
+
</HazoAuthProvider>
|
|
180
|
+
</body>
|
|
181
|
+
</html>
|
|
182
|
+
);
|
|
183
|
+
}
|
|
184
|
+
```
|
|
85
185
|
|
|
86
186
|
### Manual Setup (Advanced)
|
|
87
187
|
|
package/SETUP_CHECKLIST.md
CHANGED
|
@@ -306,8 +306,14 @@ sqlite3 data/hazo_auth.sqlite ".tables"
|
|
|
306
306
|
|
|
307
307
|
Run this SQL script in your PostgreSQL database:
|
|
308
308
|
|
|
309
|
+
**Important:** Run the entire script in order. The enum type must be created before the table that uses it.
|
|
310
|
+
|
|
309
311
|
```sql
|
|
310
|
-
--
|
|
312
|
+
-- Ensure we're in the public schema (or your target schema)
|
|
313
|
+
SET search_path TO public;
|
|
314
|
+
|
|
315
|
+
-- Create enum type (drop first if it exists to avoid conflicts)
|
|
316
|
+
DROP TYPE IF EXISTS hazo_enum_profile_source_enum CASCADE;
|
|
311
317
|
CREATE TYPE hazo_enum_profile_source_enum AS ENUM ('gravatar', 'custom', 'predefined');
|
|
312
318
|
|
|
313
319
|
-- Create users table
|
|
@@ -387,6 +393,64 @@ SELECT table_name FROM information_schema.tables WHERE table_name LIKE 'hazo_%';
|
|
|
387
393
|
-- Expected: 6 tables listed
|
|
388
394
|
```
|
|
389
395
|
|
|
396
|
+
**Grant access to admin user:**
|
|
397
|
+
|
|
398
|
+
After creating the tables, grant appropriate permissions to your admin database user. Replace `your_admin_user` with your actual PostgreSQL username:
|
|
399
|
+
|
|
400
|
+
```sql
|
|
401
|
+
-- Grant usage on schema (usually 'public')
|
|
402
|
+
GRANT USAGE ON SCHEMA public TO your_admin_user;
|
|
403
|
+
|
|
404
|
+
-- Grant all privileges on all hazo_* tables
|
|
405
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_users TO your_admin_user;
|
|
406
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_refresh_tokens TO your_admin_user;
|
|
407
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_permissions TO your_admin_user;
|
|
408
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_roles TO your_admin_user;
|
|
409
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_role_permissions TO your_admin_user;
|
|
410
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_user_roles TO your_admin_user;
|
|
411
|
+
|
|
412
|
+
-- Grant usage on the enum type
|
|
413
|
+
GRANT USAGE ON TYPE hazo_enum_profile_source_enum TO your_admin_user;
|
|
414
|
+
|
|
415
|
+
-- Grant privileges on sequences (if using SERIAL instead of UUID, though not needed for UUID)
|
|
416
|
+
-- GRANT USAGE, SELECT ON ALL SEQUENCES IN SCHEMA public TO your_admin_user;
|
|
417
|
+
|
|
418
|
+
-- Optional: Grant privileges on future tables (if you plan to add more hazo_* tables)
|
|
419
|
+
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON TABLES TO your_admin_user;
|
|
420
|
+
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT ALL PRIVILEGES ON SEQUENCES TO your_admin_user;
|
|
421
|
+
```
|
|
422
|
+
|
|
423
|
+
**For PostgREST/API access (if using PostgREST):**
|
|
424
|
+
|
|
425
|
+
If you're using PostgREST, you'll typically use an `anon` role for unauthenticated access and an `authenticated` role for authenticated users. Grant appropriate permissions:
|
|
426
|
+
|
|
427
|
+
```sql
|
|
428
|
+
-- Create roles if they don't exist
|
|
429
|
+
-- CREATE ROLE anon;
|
|
430
|
+
-- CREATE ROLE authenticated;
|
|
431
|
+
|
|
432
|
+
-- Grant usage on schema
|
|
433
|
+
GRANT USAGE ON SCHEMA public TO anon, authenticated;
|
|
434
|
+
|
|
435
|
+
-- Grant select on tables for anon (public read access)
|
|
436
|
+
GRANT SELECT ON TABLE hazo_users TO anon;
|
|
437
|
+
GRANT SELECT ON TABLE hazo_permissions TO anon;
|
|
438
|
+
GRANT SELECT ON TABLE hazo_roles TO anon;
|
|
439
|
+
GRANT SELECT ON TABLE hazo_role_permissions TO anon;
|
|
440
|
+
GRANT SELECT ON TABLE hazo_user_roles TO anon;
|
|
441
|
+
|
|
442
|
+
-- Grant full access to authenticated users (adjust based on your RLS policies)
|
|
443
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_users TO authenticated;
|
|
444
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_refresh_tokens TO authenticated;
|
|
445
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_permissions TO authenticated;
|
|
446
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_roles TO authenticated;
|
|
447
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_role_permissions TO authenticated;
|
|
448
|
+
GRANT ALL PRIVILEGES ON TABLE hazo_user_roles TO authenticated;
|
|
449
|
+
|
|
450
|
+
-- Grant usage on enum type
|
|
451
|
+
GRANT USAGE ON TYPE hazo_enum_profile_source_enum TO anon, authenticated;
|
|
452
|
+
```
|
|
453
|
+
|
|
390
454
|
**Checklist:**
|
|
391
455
|
- [ ] Database created (SQLite file or PostgreSQL)
|
|
392
456
|
- [ ] All 6 tables exist: `hazo_users`, `hazo_refresh_tokens`, `hazo_permissions`, `hazo_roles`, `hazo_role_permissions`, `hazo_user_roles`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_email_verification.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/email_verification/hooks/use_email_verification.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAgC,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;
|
|
1
|
+
{"version":3,"file":"use_email_verification.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/email_verification/hooks/use_email_verification.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAgC,KAAK,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AAKxH,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC;AACnF,MAAM,MAAM,2BAA2B,GAAG,OAAO,CAAC,MAAM,CAAC,wBAAwB,EAAE,MAAM,CAAC,CAAC,GAAG;IAC5F,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,0BAA0B,CAAC,OAAO,GAAG,OAAO,IAAI;IAC1D,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACtC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,0BAA0B,GAAG;IACvC,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,2BAA2B,CAAC;IACpC,MAAM,EAAE,2BAA2B,CAAC;IACpC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,CAAC,OAAO,EAAE,wBAAwB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9E,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,kBAAkB,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IACtE,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B,CAAC;AAQF,eAAO,MAAM,sBAAsB,GAAI,OAAO,EAAG,2CAI9C,0BAA0B,CAAC,OAAO,CAAC,KAAG,0BAsPxC,CAAC"}
|
|
@@ -5,12 +5,14 @@ import { useRouter, useSearchParams } from "next/navigation";
|
|
|
5
5
|
import { toast } from "sonner";
|
|
6
6
|
import { EMAIL_VERIFICATION_FIELD_IDS } from "../config/email_verification_field_config";
|
|
7
7
|
import { validateEmail } from "../../shared/utils/validation";
|
|
8
|
+
import { useHazoAuthConfig } from "../../../../contexts/hazo_auth_provider";
|
|
8
9
|
// section: helpers
|
|
9
10
|
const buildInitialValues = (initialEmail) => ({
|
|
10
11
|
[EMAIL_VERIFICATION_FIELD_IDS.EMAIL]: initialEmail || "",
|
|
11
12
|
});
|
|
12
13
|
// section: hook
|
|
13
14
|
export const use_email_verification = ({ dataClient, redirectDelay = 5, loginPath = "/hazo_auth/login", }) => {
|
|
15
|
+
const { apiBasePath } = useHazoAuthConfig();
|
|
14
16
|
const router = useRouter();
|
|
15
17
|
const searchParams = useSearchParams();
|
|
16
18
|
const token = searchParams.get("token");
|
|
@@ -48,7 +50,7 @@ export const use_email_verification = ({ dataClient, redirectDelay = 5, loginPat
|
|
|
48
50
|
setIsError(false);
|
|
49
51
|
setErrorMessage(undefined);
|
|
50
52
|
try {
|
|
51
|
-
const response = await fetch(
|
|
53
|
+
const response = await fetch(`${apiBasePath}/verify_email?token=${encodeURIComponent(token)}`, {
|
|
52
54
|
method: "GET",
|
|
53
55
|
});
|
|
54
56
|
const data = await response.json();
|
|
@@ -79,7 +81,7 @@ export const use_email_verification = ({ dataClient, redirectDelay = 5, loginPat
|
|
|
79
81
|
setErrorMessage(errorMessage);
|
|
80
82
|
// Try to extract email from error response if available
|
|
81
83
|
try {
|
|
82
|
-
const response = await fetch(
|
|
84
|
+
const response = await fetch(`${apiBasePath}/verify_email?token=${encodeURIComponent(token)}`, {
|
|
83
85
|
method: "GET",
|
|
84
86
|
});
|
|
85
87
|
const data = await response.json();
|
|
@@ -155,7 +157,7 @@ export const use_email_verification = ({ dataClient, redirectDelay = 5, loginPat
|
|
|
155
157
|
setIsSubmitting(true);
|
|
156
158
|
setErrors({});
|
|
157
159
|
try {
|
|
158
|
-
const response = await fetch(
|
|
160
|
+
const response = await fetch(`${apiBasePath}/resend_verification`, {
|
|
159
161
|
method: "POST",
|
|
160
162
|
headers: {
|
|
161
163
|
"Content-Type": "application/json",
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { StaticImageData } from "next/image";
|
|
1
2
|
import { type ButtonPaletteOverrides, type LayoutFieldMapOverrides, type LayoutLabelOverrides } from "../shared/config/layout_customization";
|
|
2
3
|
import { type EmailVerificationSuccessLabels, type EmailVerificationErrorLabels } from "./config/email_verification_field_config";
|
|
3
4
|
import { type LayoutDataClient } from "../shared/data/layout_data_client";
|
|
4
5
|
export type EmailVerificationLayoutProps<TClient = unknown> = {
|
|
5
|
-
image_src: string;
|
|
6
|
+
image_src: string | StaticImageData;
|
|
6
7
|
image_alt: string;
|
|
7
8
|
image_background_color?: string;
|
|
8
9
|
field_overrides?: LayoutFieldMapOverrides;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/email_verification/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/email_verification/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE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B,WAAW,EACX,yBAAyB,EACzB,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,GACrB,EAAE,4BAA4B,CAAC,OAAO,CAAC,2CAkOvC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_forgot_password_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"use_forgot_password_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/forgot_password/hooks/use_forgot_password_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAA6B,KAAK,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAK/G,MAAM,MAAM,wBAAwB,GAAG,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC;AAC7E,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,CAAC,GAAG;IACtF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,2BAA2B,CAAC,OAAO,GAAG,OAAO,IAAI;IAC3D,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;CACvC,CAAC;AAEF,MAAM,MAAM,2BAA2B,GAAG;IACxC,MAAM,EAAE,wBAAwB,CAAC;IACjC,MAAM,EAAE,wBAAwB,CAAC;IACjC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,YAAY,EAAE,OAAO,CAAC;IACtB,YAAY,EAAE,OAAO,CAAC;IACtB,iBAAiB,EAAE,CAAC,OAAO,EAAE,qBAAqB,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC3E,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,CAAC,SAAS,CAAC,eAAe,CAAC,KAAK,IAAI,CAAC;IAChE,YAAY,EAAE,MAAM,IAAI,CAAC;CAC1B,CAAC;AAQF,eAAO,MAAM,wBAAwB,GAAI,OAAO,EAAG,iBAEhD,2BAA2B,CAAC,OAAO,CAAC,KAAG,2BA4IzC,CAAC"}
|
|
@@ -4,12 +4,14 @@ import { useCallback, useMemo, useState } from "react";
|
|
|
4
4
|
import { toast } from "sonner";
|
|
5
5
|
import { FORGOT_PASSWORD_FIELD_IDS } from "../config/forgot_password_field_config";
|
|
6
6
|
import { validateEmail } from "../../shared/utils/validation";
|
|
7
|
+
import { useHazoAuthConfig } from "../../../../contexts/hazo_auth_provider";
|
|
7
8
|
// section: helpers
|
|
8
9
|
const buildInitialValues = () => ({
|
|
9
10
|
[FORGOT_PASSWORD_FIELD_IDS.EMAIL]: "",
|
|
10
11
|
});
|
|
11
12
|
// section: hook
|
|
12
13
|
export const use_forgot_password_form = ({ dataClient, }) => {
|
|
14
|
+
const { apiBasePath } = useHazoAuthConfig();
|
|
13
15
|
const [values, setValues] = useState(buildInitialValues);
|
|
14
16
|
const [errors, setErrors] = useState({});
|
|
15
17
|
const [emailTouched, setEmailTouched] = useState(false);
|
|
@@ -71,7 +73,7 @@ export const use_forgot_password_form = ({ dataClient, }) => {
|
|
|
71
73
|
setIsSubmitting(true);
|
|
72
74
|
setErrors({});
|
|
73
75
|
try {
|
|
74
|
-
const response = await fetch(
|
|
76
|
+
const response = await fetch(`${apiBasePath}/forgot_password`, {
|
|
75
77
|
method: "POST",
|
|
76
78
|
headers: {
|
|
77
79
|
"Content-Type": "application/json",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { StaticImageData } from "next/image";
|
|
1
2
|
import { type ButtonPaletteOverrides, type LayoutFieldMapOverrides, type LayoutLabelOverrides } from "../shared/config/layout_customization";
|
|
2
3
|
import { type LayoutDataClient } from "../shared/data/layout_data_client";
|
|
3
4
|
export type ForgotPasswordLayoutProps<TClient = unknown> = {
|
|
4
|
-
image_src: string;
|
|
5
|
+
image_src: string | StaticImageData;
|
|
5
6
|
image_alt: string;
|
|
6
7
|
image_background_color?: string;
|
|
7
8
|
field_overrides?: LayoutFieldMapOverrides;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/forgot_password/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/forgot_password/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAMlD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAC;AAW/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAI1E,MAAM,MAAM,yBAAyB,CAAC,OAAO,GAAG,OAAO,IAAI;IACzD,SAAS,EAAE,MAAM,GAAG,eAAe,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AASF,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,OAAO,EAAE,EACtD,SAAS,EACT,SAAS,EACT,sBAAkC,EAClC,eAAe,EACf,MAAM,EACN,aAAa,EACb,WAAW,EACX,YAAiC,EACjC,aAAyB,EACzB,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,GACrB,EAAE,yBAAyB,CAAC,OAAO,CAAC,2CA+GpC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_login_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/login/hooks/use_login_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;
|
|
1
|
+
{"version":3,"file":"use_login_form.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/login/hooks/use_login_form.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AAC7E,OAAO,EAAmB,KAAK,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAOlF,MAAM,MAAM,eAAe,GAAG,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC;AAC3D,MAAM,MAAM,eAAe,GAAG,OAAO,CAAC,MAAM,CAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;AACpE,MAAM,MAAM,uBAAuB,GAAG;IACpC,QAAQ,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,kBAAkB,CAAC,OAAO,GAAG,OAAO,IAAI;IAClD,UAAU,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACtC,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,C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
6
6
|
import { validateEmail } from "../../shared/utils/validation";
|
|
7
7
|
import { get_client_ip } from "../../shared/utils/ip_address";
|
|
8
8
|
import { trigger_auth_status_refresh } from "../../shared/hooks/use_auth_status";
|
|
9
|
+
import { useHazoAuthConfig } from "../../../../contexts/hazo_auth_provider";
|
|
9
10
|
// section: helpers
|
|
10
11
|
const buildInitialValues = () => ({
|
|
11
12
|
[LOGIN_FIELD_IDS.EMAIL]: "",
|
|
@@ -21,6 +22,7 @@ const get_line_number = () => {
|
|
|
21
22
|
// section: hook
|
|
22
23
|
export const use_login_form = ({ dataClient, logger, redirectRoute, successMessage = "Successfully logged in", urlOnLogon, }) => {
|
|
23
24
|
const router = useRouter();
|
|
25
|
+
const { apiBasePath } = useHazoAuthConfig();
|
|
24
26
|
const [values, setValues] = useState(buildInitialValues);
|
|
25
27
|
const [errors, setErrors] = useState({});
|
|
26
28
|
const [passwordVisibility, setPasswordVisibility] = useState({
|
|
@@ -110,7 +112,7 @@ export const use_login_form = ({ dataClient, logger, redirectRoute, successMessa
|
|
|
110
112
|
const currentIp = clientIp === "unknown" ? await get_client_ip() : clientIp;
|
|
111
113
|
setClientIp(currentIp);
|
|
112
114
|
// Attempt login via API route
|
|
113
|
-
const response = await fetch(
|
|
115
|
+
const response = await fetch(`${apiBasePath}/login`, {
|
|
114
116
|
method: "POST",
|
|
115
117
|
headers: {
|
|
116
118
|
"Content-Type": "application/json",
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { StaticImageData } from "next/image";
|
|
1
2
|
import { type ButtonPaletteOverrides, type LayoutFieldMapOverrides, type LayoutLabelOverrides } from "../shared/config/layout_customization";
|
|
2
3
|
import { type LayoutDataClient } from "../shared/data/layout_data_client";
|
|
3
4
|
export type LoginLayoutProps<TClient = unknown> = {
|
|
4
|
-
image_src: string;
|
|
5
|
+
image_src: string | StaticImageData;
|
|
5
6
|
image_alt: string;
|
|
6
7
|
image_background_color?: string;
|
|
7
8
|
field_overrides?: LayoutFieldMapOverrides;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/login/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/login/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AASlD,OAAO,EACL,KAAK,sBAAsB,EAC3B,KAAK,uBAAuB,EAC5B,KAAK,oBAAoB,EAC1B,MAAM,uCAAuC,CAAC;AAW/C,OAAO,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAG1E,MAAM,MAAM,gBAAgB,CAAC,OAAO,GAAG,OAAO,IAAI;IAChD,SAAS,EAAE,MAAM,GAAG,eAAe,CAAC;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,eAAe,CAAC,EAAE,uBAAuB,CAAC;IAC1C,MAAM,CAAC,EAAE,oBAAoB,CAAC;IAC9B,aAAa,CAAC,EAAE,sBAAsB,CAAC;IACvC,WAAW,EAAE,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACvC,MAAM,CAAC,EAAE;QACP,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QAChE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QACjE,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;QAChE,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;KAClE,CAAC;IACF,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,sBAAsB,CAAC,EAAE,MAAM,CAAC;IAChC,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,qBAAqB,CAAC,EAAE,MAAM,CAAC;IAC/B,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAUF,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,OAAO,EAAE,EAC5C,SAAS,EACT,SAAS,EACT,sBAAkC,EAClC,eAAe,EACf,MAAM,EACN,aAAa,EACb,WAAW,EACX,MAAM,EACN,aAAa,EACb,cAAyC,EACzC,sBAAoD,EACpD,gBAAuB,EACvB,oBAA4B,EAC5B,qBAAqC,EACrC,cAAoB,EACpB,oBAAmD,EACnD,qBAA0C,EAC1C,mBAA2C,EAC3C,oBAAuC,EACvC,UAAU,GACX,EAAE,gBAAgB,CAAC,OAAO,CAAC,2CAiK3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile_picture_dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/my_settings/components/profile_picture_dialog.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profile_picture_dialog.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/my_settings/components/profile_picture_dialog.tsx"],"names":[],"mappings":"AAuBA,MAAM,MAAM,yBAAyB,GAAG;IACtC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAA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B,EACxB,iBAA4B,EAC5B,QAAgB,EAChB,QAAQ,EACR,OAAO,EACP,SAAS,GACV,EAAE,yBAAyB,2CAgT3B"}
|
|
@@ -12,6 +12,7 @@ import { ProfilePictureLibraryTab } from "./profile_picture_library_tab";
|
|
|
12
12
|
import { ProfilePictureGravatarTab } from "./profile_picture_gravatar_tab";
|
|
13
13
|
import { toast } from "sonner";
|
|
14
14
|
import { cn } from "../../../../lib/utils";
|
|
15
|
+
import { useHazoAuthConfig } from "../../../../contexts/hazo_auth_provider";
|
|
15
16
|
// section: component
|
|
16
17
|
/**
|
|
17
18
|
* Profile picture dialog component with tabs for Upload, Library, and Gravatar
|
|
@@ -20,6 +21,7 @@ import { cn } from "../../../../lib/utils";
|
|
|
20
21
|
* @returns Profile picture dialog component
|
|
21
22
|
*/
|
|
22
23
|
export function ProfilePictureDialog({ open, onOpenChange, onSave, email, allowPhotoUpload, maxPhotoSize, libraryPhotoPath, currentProfilePictureUrl, currentProfileSource, saveButtonLabel = "Save", cancelButtonLabel = "Cancel", disabled = false, messages, uiSizes, fileTypes, }) {
|
|
24
|
+
const { apiBasePath } = useHazoAuthConfig();
|
|
23
25
|
const [useUpload, setUseUpload] = useState(false);
|
|
24
26
|
const [useLibrary, setUseLibrary] = useState(false);
|
|
25
27
|
const [useGravatar, setUseGravatar] = useState(false);
|
|
@@ -126,7 +128,7 @@ export function ProfilePictureDialog({ open, onOpenChange, onSave, email, allowP
|
|
|
126
128
|
try {
|
|
127
129
|
const formData = new FormData();
|
|
128
130
|
formData.append("file", file);
|
|
129
|
-
const response = await fetch(
|
|
131
|
+
const response = await fetch(`${apiBasePath}/upload_profile_picture`, {
|
|
130
132
|
method: "POST",
|
|
131
133
|
credentials: "include",
|
|
132
134
|
body: formData,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile_picture_library_tab.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/my_settings/components/profile_picture_library_tab.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"profile_picture_library_tab.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/my_settings/components/profile_picture_library_tab.tsx"],"names":[],"mappings":"AAeA,MAAM,MAAM,6BAA6B,GAAG;IAC1C,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,aAAa,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IAC1C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,gBAAgB,EAAE,MAAM,CAAC;IACzB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,qBAAqB,EAAE,MAAM,CAAC;IAC9B,oBAAoB,EAAE,MAAM,CAAC;IAC7B,uBAAuB,EAAE,MAAM,CAAC;IAChC,uBAAuB,EAAE,MAAM,CAAC;CACjC,CAAC;AAGF;;;;;;GAMG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,QAAgB,EAChB,gBAAgB,EAChB,eAAe,EACf,qBAAqB,EACrB,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,GACxB,EAAE,6BAA6B,2CAwQ/B"}
|
|
@@ -10,6 +10,7 @@ import { Avatar, AvatarFallback } from "../../../ui/avatar";
|
|
|
10
10
|
import { VerticalTabs, VerticalTabsList, VerticalTabsTrigger } from "../../../ui/vertical-tabs";
|
|
11
11
|
import { Loader2 } from "lucide-react";
|
|
12
12
|
import { HazoUITooltip } from "../../../ui/hazo_ui_tooltip";
|
|
13
|
+
import { useHazoAuthConfig } from "../../../../contexts/hazo_auth_provider";
|
|
13
14
|
// section: component
|
|
14
15
|
/**
|
|
15
16
|
* Library tab component for profile picture dialog
|
|
@@ -19,6 +20,7 @@ import { HazoUITooltip } from "../../../ui/hazo_ui_tooltip";
|
|
|
19
20
|
* @returns Library tab component
|
|
20
21
|
*/
|
|
21
22
|
export function ProfilePictureLibraryTab({ useLibrary, onUseLibraryChange, onPhotoSelect, disabled = false, libraryPhotoPath, currentPhotoUrl, libraryTooltipMessage, tooltipIconSizeSmall, libraryPhotoGridColumns, libraryPhotoPreviewSize, }) {
|
|
23
|
+
const { apiBasePath } = useHazoAuthConfig();
|
|
22
24
|
const [categories, setCategories] = useState([]);
|
|
23
25
|
const [selectedCategory, setSelectedCategory] = useState(null);
|
|
24
26
|
const [photos, setPhotos] = useState([]);
|
|
@@ -30,7 +32,7 @@ export function ProfilePictureLibraryTab({ useLibrary, onUseLibraryChange, onPho
|
|
|
30
32
|
const loadCategories = async () => {
|
|
31
33
|
setLoadingCategories(true);
|
|
32
34
|
try {
|
|
33
|
-
const response = await fetch(
|
|
35
|
+
const response = await fetch(`${apiBasePath}/library_photos`);
|
|
34
36
|
const data = await response.json();
|
|
35
37
|
if (data.success && data.categories) {
|
|
36
38
|
setCategories(data.categories);
|
|
@@ -70,7 +72,7 @@ export function ProfilePictureLibraryTab({ useLibrary, onUseLibraryChange, onPho
|
|
|
70
72
|
const loadPhotos = async () => {
|
|
71
73
|
setLoadingPhotos(true);
|
|
72
74
|
try {
|
|
73
|
-
const response = await fetch(
|
|
75
|
+
const response = await fetch(`${apiBasePath}/library_photos?category=${encodeURIComponent(selectedCategory)}`);
|
|
74
76
|
const data = await response.json();
|
|
75
77
|
if (data.success && data.photos) {
|
|
76
78
|
setPhotos(data.photos);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"use_my_settings.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/my_settings/hooks/use_my_settings.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;
|
|
1
|
+
{"version":3,"file":"use_my_settings.d.ts","sourceRoot":"","sources":["../../../../../src/components/layouts/my_settings/hooks/use_my_settings.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,0CAA0C,CAAC;AAI3F,MAAM,MA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AA0B,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAGhD,cAAc,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACjD,eAAe,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAGlD,eAAe,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACtC,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,oBAAoB,EAAE,0BAA0B,CAAC;CAClD,CAAC;AA4BF;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,EAC9B,oBAAoB,GACrB,EAAE,mBAAmB,GAAG,mBAAmB,CA2W3C"}
|
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
import { useState, useCallback } from "react";
|
|
6
6
|
import { use_auth_status, trigger_auth_status_refresh } from "../../shared/hooks/use_auth_status";
|
|
7
7
|
import { toast } from "sonner";
|
|
8
|
+
import { useHazoAuthConfig } from "../../../../contexts/hazo_auth_provider";
|
|
8
9
|
// section: helpers
|
|
9
10
|
/**
|
|
10
11
|
* Validates email format
|
|
@@ -36,6 +37,7 @@ const validateName = (name) => {
|
|
|
36
37
|
* @returns My settings hook result with state and actions
|
|
37
38
|
*/
|
|
38
39
|
export function use_my_settings({ passwordRequirements, }) {
|
|
40
|
+
const { apiBasePath } = useHazoAuthConfig();
|
|
39
41
|
const authStatus = use_auth_status();
|
|
40
42
|
// Password fields state
|
|
41
43
|
const [passwordFields, setPasswordFields] = useState({
|
|
@@ -72,7 +74,7 @@ export function use_my_settings({ passwordRequirements, }) {
|
|
|
72
74
|
throw new Error(validationError);
|
|
73
75
|
}
|
|
74
76
|
try {
|
|
75
|
-
const response = await fetch(
|
|
77
|
+
const response = await fetch(`${apiBasePath}/update_user`, {
|
|
76
78
|
method: "PATCH",
|
|
77
79
|
headers: {
|
|
78
80
|
"Content-Type": "application/json",
|
|
@@ -105,7 +107,7 @@ export function use_my_settings({ passwordRequirements, }) {
|
|
|
105
107
|
throw new Error(validationError);
|
|
106
108
|
}
|
|
107
109
|
try {
|
|
108
|
-
const response = await fetch(
|
|
110
|
+
const response = await fetch(`${apiBasePath}/update_user`, {
|
|
109
111
|
method: "PATCH",
|
|
110
112
|
headers: {
|
|
111
113
|
"Content-Type": "application/json",
|
|
@@ -216,7 +218,7 @@ export function use_my_settings({ passwordRequirements, }) {
|
|
|
216
218
|
return;
|
|
217
219
|
}
|
|
218
220
|
try {
|
|
219
|
-
const response = await fetch(
|
|
221
|
+
const response = await fetch(`${apiBasePath}/change_password`, {
|
|
220
222
|
method: "POST",
|
|
221
223
|
headers: {
|
|
222
224
|
"Content-Type": "application/json",
|
|
@@ -274,7 +276,7 @@ export function use_my_settings({ passwordRequirements, }) {
|
|
|
274
276
|
*/
|
|
275
277
|
const handleProfilePictureSave = useCallback(async (profilePictureUrl, profileSource) => {
|
|
276
278
|
try {
|
|
277
|
-
const response = await fetch(
|
|
279
|
+
const response = await fetch(`${apiBasePath}/update_user`, {
|
|
278
280
|
method: "PATCH",
|
|
279
281
|
headers: {
|
|
280
282
|
"Content-Type": "application/json",
|
|
@@ -308,7 +310,7 @@ export function use_my_settings({ passwordRequirements, }) {
|
|
|
308
310
|
*/
|
|
309
311
|
const handleProfilePictureRemove = useCallback(async () => {
|
|
310
312
|
try {
|
|
311
|
-
const response = await fetch(
|
|
313
|
+
const response = await fetch(`${apiBasePath}/remove_profile_picture`, {
|
|
312
314
|
method: "DELETE",
|
|
313
315
|
headers: {
|
|
314
316
|
"Content-Type": "application/json",
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type MySettingsLabelOverrides } from "./config/my_settings_field_config";
|
|
2
2
|
import type { PasswordRequirementOptions, ButtonPaletteOverrides } from "../shared/config/layout_customization";
|
|
3
3
|
export type MySettingsLayoutProps = {
|
|
4
|
+
className?: string;
|
|
4
5
|
labels?: MySettingsLabelOverrides;
|
|
5
6
|
button_colors?: ButtonPaletteOverrides;
|
|
6
7
|
password_requirements: PasswordRequirementOptions;
|
|
@@ -60,5 +61,5 @@ export type MySettingsLayoutProps = {
|
|
|
60
61
|
* @param props - Component props including labels, button colors, password requirements, etc.
|
|
61
62
|
* @returns My settings layout component
|
|
62
63
|
*/
|
|
63
|
-
export default function my_settings_layout({ labels, button_colors, password_requirements, profilePicture, userFields, unauthorizedMessage, loginButtonLabel, loginPath, heading, subHeading, profilePhotoLabel, profilePhotoRecommendation, uploadPhotoButtonLabel, removePhotoButtonLabel, profileInformationLabel, passwordLabel, currentPasswordLabel, newPasswordLabel, confirmPasswordLabel, messages, uiSizes, fileTypes, }: MySettingsLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
export default function my_settings_layout({ className, labels, button_colors, password_requirements, profilePicture, userFields, unauthorizedMessage, loginButtonLabel, loginPath, heading, subHeading, profilePhotoLabel, profilePhotoRecommendation, uploadPhotoButtonLabel, removePhotoButtonLabel, profileInformationLabel, passwordLabel, currentPasswordLabel, newPasswordLabel, confirmPasswordLabel, messages, uiSizes, fileTypes, }: MySettingsLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
64
65
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/my_settings/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,uCAAuC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/layouts/my_settings/index.tsx"],"names":[],"mappings":"AAWA,OAAO,EAGL,KAAK,wBAAwB,EAC9B,MAAM,mCAAmC,CAAC;AAC3C,OAAO,KAAK,EACV,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,uCAAuC,CAAC;AAQ/C,MAAM,MAA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