Commit Graph

128 Commits

Author SHA1 Message Date
HawkveltGiteaAdmin e6f0d0b004 Merge pull request #2 from jamesii-b/gatehouse/secuird-CA-merge-v2.01
Gatehouse/secuird ca merge v2.01
2026-03-03 13:52:25 +10:30
HawkveltGiteaAdmin cfbd64e189 Merge pull request #1 from jamesii-b/oidc/v1.01
Feat: Handle Oauth Callback/Bridge + Microsoft Oauth
2026-03-03 13:52:12 +10:30
JamesBhattarai b97937f080 Feat(Fix): Multi Org, Suspension, User Detail
Multi Org switch, members suspend/unsuspend status, delete account, next serial, show email in user member search
2026-03-02 23:55:47 +05:45
JamesBhattarai 6cab506603 Feat(Fix): CA manage Host/User Key 2026-03-01 20:41:31 +05:45
JamesBhattarai f1a8e313fc Feat(Fix): User & Org Setup Initial (Invite + Create on own) & Chore: UI 2026-03-01 20:11:22 +05:45
JamesBhattarai 4c01fd0107 Feat: RBAC, Keys Extension, Invites
feat: org members page — invite users, cancel invites, change roles
feat: show pending invitations banner on profile page
feat: invite accept flow for existing users (no password needed)
feat: departments page updates
feat: SSH keys page — dept cert policy UI (expiry + extensions)
feat: wire up auth pages to real API (register, verify, reset, OIDC)
feat: CLI auth bridge — login page handles CLI token flow
feat: admin users — suspend/unsuspend, role badges, role filter
feat: add admin OAuth providers management page
feat: activity page — org-wide audit log view for admins
feat: add my memberships page
chore: add isOrgAdmin/isOrgMember to AuthContext, restrict sidebar
chore: update app routing and shared layout
2026-03-01 16:50:19 +05:45
JamesBhattarai 62f767474b Feat(Fix): SSH Keys-Expiry+Log; Department+Principal Link; CA Keys mgmt;
- Fix Login nav to /profile or /
2026-02-28 23:35:32 +05:45
JamesBhattarai c32cb4757a Feat(Chore): Implemented Audit-Logs, Department, Principal. 2026-02-27 21:08:16 +05:45
JamesBhattarai b94053aebc Feat: Handle Oauth Callback/Bridge + Microsoft Oauth 2026-02-26 23:38:45 +05:45
nexgen_mirrors 5c2971e38d fix(auth): validate WebAuthn rp.id against current host
Add ensureValidRpId helper to validate and correct rp.id for WebAuthn
operations, preventing authentication failures when the configured rp.id
doesn't match the current hostname. Also add OAuthProvider type and fix
type casting in LoginPage.
2026-02-24 01:20:41 +10:30
coryHawkvelt e854bf801e google login works 2026-01-21 03:09:38 +10:30
coryHawkvelt e7c2c873c2 can link google accounts! 2026-01-20 15:54:11 +10:30
coryHawkvelt 87c143a332 Force mfa if enabled at login 2026-01-16 17:50:56 +10:30
coryHawkvelt 4ee3b81074 enabled policies 2026-01-16 17:31:25 +10:30
coryHawkvelt 71c58ddb60 fix(auth): ensure token storage before user state updates
- Store authentication tokens explicitly before setting user state in login
  and TOTP verification flows to prevent race conditions
- Add 'credentials: include' to WebAuthn endpoints for proper session
  cookie handling
- Add comprehensive debug logging throughout authentication flow to trace
  token lifecycle and API requests
- Update WebAuthn completeLogin to use fetch directly instead of request
  helper to properly handle session cookies
- Add allowedHosts configuration to Vite dev server
2026-01-16 11:35:21 +10:30
gpt-engineer-app[bot] 7e92c7bea1 Fix auth headers on login
Ensure Authorization header is preserved and credentials are included across all API calls after login by updating the global request flow to always include the auth token and cookies, preventing API requests from failing due to missing authentication.

X-Lovable-Edit-ID: edt-e27762ef-c64c-401b-9944-0d5bcb8ea624
2026-01-15 23:15:04 +00:00
gpt-engineer-app[bot] 65c2a78552 Changes 2026-01-15 23:15:04 +00:00
gpt-engineer-app[bot] 53d4e97bf7 Restore cookies with API calls
Ensure fetch requests always include credentials to maintain session cookies after login and TOTP flows.

X-Lovable-Edit-ID: edt-bd4a695e-663c-4919-a238-aa222a5c0609
2026-01-15 22:46:27 +00:00
gpt-engineer-app[bot] c7fe145271 Changes 2026-01-15 22:46:27 +00:00
gpt-engineer-app[bot] 92bd4f7380 Add WebAuthn passkeys
Enhance login and security UI with WebAuthn passkey support:
- Implement WebAuthn API integration for registration, login, and credential management.
- Wire up begin/complete registration and login flows, including credential handling and status checks.
- Extend API client with webauthn endpoints, status, and credential management; adjust token handling for 401s.
- Update Login and Security pages to support passkey enrollment, removal, and display of passkeys.
- Add WebAuthn utilities and adjust existing components to work with new flows.

X-Lovable-Edit-ID: edt-5876d103-501a-44d9-b117-e671b9995451
2026-01-14 15:32:30 +00:00
gpt-engineer-app[bot] f9d66f9625 Changes 2026-01-14 15:32:30 +00:00
gpt-engineer-app[bot] 49e10218a4 Enhance TOTP login flow
- Implement TOTP prompts during login: if login returns requires_totp, show TOTP input and verify via /auth/totp/verify to complete authentication.
- Update API client to support TOTP flow, store tokens after successful TOTP verification.
- Wire AuthContext and LoginPage to handle TOTP challenge, returning requiresTotp from login and proceeding after verification.
- Preserve token on 401 for credential-related steps; clear only on true session-invalid responses.

X-Lovable-Edit-ID: edt-0672a4fb-c58a-4d0c-88dc-86bcee853964
2026-01-14 07:21:56 +00:00
gpt-engineer-app[bot] b77f2630a1 Changes 2026-01-14 07:21:55 +00:00
gpt-engineer-app[bot] 1ccceb7372 Fix TOTP QR render
Update TotpEnrollmentWizard to handle QR code data_uri gracefully by using enrollmentData.qr_code directly if it already starts with data:, otherwise prefix with data:image/png;base64,. This prevents invalid HTML and extra requests.

X-Lovable-Edit-ID: edt-779080b3-442d-4aeb-aaaf-e0e3c26b795d
2026-01-14 02:24:14 +00:00
gpt-engineer-app[bot] 6e473725b4 Changes 2026-01-14 02:24:13 +00:00
gpt-engineer-app[bot] 3dee2968c2 Refine 401 handling for API
Improve token management on 401 responses by introducing configurable token-clearing logic, apply it to sensitive endpoints (TOTP verify, disable, regenerator, and password change), and adjust me endpoint behavior to use explicit clear-token rules. Also preserve no-cache headers and add dev logs for 401 events.

X-Lovable-Edit-ID: edt-9528378f-7146-45e6-96d9-47c22492fd87
2026-01-14 02:10:24 +00:00
gpt-engineer-app[bot] 5bf44f37a2 Changes 2026-01-14 02:10:23 +00:00
gpt-engineer-app[bot] 4516a53168 Wire up TOTP endpoints
Enable real TOTP flow by integrating enroll/verify/backup codes API, updating TotpEnrollmentWizard and TotpRemoveDialog to use backend, and connect SecurityPage to live status. Replaces mock data with API calls, adds status refresh after enrollment, and wires removal to API with UI confirmations.

X-Lovable-Edit-ID: edt-3f2bb4a3-06ff-406a-bc2c-d4c70de452a1
2026-01-12 06:28:37 +00:00
gpt-engineer-app[bot] 872e720b9a Changes 2026-01-12 06:28:36 +00:00
gpt-engineer-app[bot] b82abaa423 Enforce no-cache for API calls
Ensure all API requests include no-cache headers to avoid cached CORS issues. Added Cache-Control, Pragma headers and set fetch to no-store, so requests are not cached.

X-Lovable-Edit-ID: edt-17929842-67a4-4e77-8ea7-1e46d2ee30fc
2026-01-12 01:24:59 +00:00
gpt-engineer-app[bot] 188b5b377a Changes 2026-01-12 01:24:59 +00:00
gpt-engineer-app[bot] fa429bd960 Enhance totp UI flow
- Add TOTP enrollment UI flow to SecurityPage via TotpEnrollmentWizard
- Integrate removal dialog TotpRemoveDialog with confirmation
- Update SecurityPage to reference new TOTP components and reflect enrollment state
- Implement wizard steps: setup, verify, backup-codes, and completion
- Show enabling status and removal option with confirmation when enrolled

X-Lovable-Edit-ID: edt-8f92b58a-f7e2-4820-9941-aeb31a19c58f
2026-01-11 09:46:53 +00:00
gpt-engineer-app[bot] f781cd9bec Changes 2026-01-11 09:46:53 +00:00
gpt-engineer-app[bot] ccb82ede0d Prevent same old/new password
Add client-side validation in SecurityPage to alert when the new password matches the current password, preventing submission and showing an error.

X-Lovable-Edit-ID: edt-3a30092e-86a6-4d0a-892f-19ece7859cfe
2026-01-11 08:20:16 +00:00
gpt-engineer-app[bot] 6ac2e6d7e7 Changes 2026-01-11 08:20:15 +00:00
gpt-engineer-app[bot] e6df39a3e4 Wire up password change
Add password change API method and integrate into SecurityPage by wiring form fields, validation, and API call to /users/me/password, replacing mock/stub logic with real endpoint handling.

X-Lovable-Edit-ID: edt-19aca63f-7777-44a3-887e-98303dc46028
2026-01-11 08:17:16 +00:00
gpt-engineer-app[bot] b37bafd216 Changes 2026-01-11 08:17:15 +00:00
gpt-engineer-app[bot] d7c5bb209c Code edited in Lovable Code Editor
Edited UI in Lovable
2026-01-11 07:03:52 +00:00
gpt-engineer-app[bot] 5be609ca8c Add robust dev fetch logging
Improve ApiDevTools to log fetch errors with stack traces during development, fix UUID generation fallback for environments lacking crypto.randomUUID, and ensure errors are surfaced in the browser console for easier debugging. Includes fallback generateUUID and preserved patching with proper catch blocks.

X-Lovable-Edit-ID: edt-83e14dbc-6e2d-4ff9-9d17-d881d62d7da6
2026-01-11 06:16:04 +00:00
gpt-engineer-app[bot] 8d01998550 Changes 2026-01-11 06:16:04 +00:00
gpt-engineer-app[bot] 16cb343bb5 Fix ApiDevTools isDev duplicate
Resolve TS2451 redeclare by removing duplicate isDev, fix fetch patch scope, and restore proper closure. Also improve login error logging to show dev details without breaking prod.

X-Lovable-Edit-ID: edt-ee281f89-34b9-41ce-ae0a-1ed1dcece8ab
2026-01-11 05:54:31 +00:00
gpt-engineer-app[bot] c8fce6e4bd Changes 2026-01-11 05:54:30 +00:00
gpt-engineer-app[bot] f173b9d403 Improve dev logs on login
Enable ApiDevTools to reliably log API requests on login by refining fetch interception (only log /api/* calls, support dev mode), and adjust login error handling to surface dev-friendly messages.

X-Lovable-Edit-ID: edt-f0cc8901-1c2f-4253-819a-332460757b44
2026-01-11 05:52:19 +00:00
gpt-engineer-app[bot] 783a0257ea Changes 2026-01-11 05:52:19 +00:00
gpt-engineer-app[bot] 3768f78247 Fix font import order
Move Google font @import to the top of index.css so it precedes Tailwind directives and avoid CSS parse error.

X-Lovable-Edit-ID: edt-61ca6e61-d390-47b8-8731-1cb35a116ac9
2026-01-11 05:45:45 +00:00
gpt-engineer-app[bot] fe9c9fb9e2 Changes 2026-01-11 05:45:45 +00:00
gpt-engineer-app[bot] 1e0a4e4c13 Make dev tools visible on login
Expose API dev console on public pages by ensuring ApiDevTools runs in dev mode across all routes, and fix hook usage to render only in development. This includes wiring the dev console to public layout (login screen) and correcting the development-mode guard to avoid React hook issues.

X-Lovable-Edit-ID: edt-a9ff8f85-ee99-48e3-aa63-c62578cf7dab
2026-01-11 05:44:51 +00:00
gpt-engineer-app[bot] c42580686e Changes 2026-01-11 05:44:51 +00:00
gpt-engineer-app[bot] afc87a45f4 Fetch orgs from API in TopBar
Replace mock org data with real data from API; fix API response handling to use organizations() correctly and render in dropdown. Adjust imports and remove unused mock data.

X-Lovable-Edit-ID: edt-f32c8098-c5cb-42f7-b2d1-8a073115526e
2026-01-08 03:42:45 +00:00
gpt-engineer-app[bot] 7a6cebe207 Changes 2026-01-08 03:42:45 +00:00