feat(auth): enhance security and audit logging

- Integrate webhook alerts for admin login lockouts.
- Implement detailed audit logging for login, logout, and setup actions.
- Improve client revocation event tracking.
- Standardize error handling in profile updates.
- Enforce 'operator' role for event API access.
This commit is contained in:
Team Dark Devil committed 2026-11-21 00:06:55 +06:00
1 parent 5c977d6977
commit 8132087085
52 files changed
+4434 -407

No files matched your search

+1 -1
View File
@@ -271,7 +271,7 @@ export async function PATCH(
await recordAdminAuditLogAsync({
actorEmail: auth.auth.session.email,
actorRole: auth.auth.session.role || "owner",
action: "CLIENT_UPDATED",
action: updates.status === "revoked" ? "CLIENT_REVOKED" : "CLIENT_UPDATED",
target: updated.clientId,
ipAddress: extractClientIp(req),
metadata: updates,