Skip to content

feat(auth): log admin login audit event - #5123

Merged
pandemicsyn merged 4 commits into
mainfrom
feat/cloud-agent-container-billing
Aug 7, 2026
Merged

pandemicsyn merged 4 commits into
mainfrom
feat/cloud-agent-container-billing

Conversation

@pandemicsyn

Copy link
Copy Markdown
Contributor

Summary

  • emit a structured admin_login_succeeded log event when a Kilocode admin authenticates
  • record the admin user ID, email, provider, and admin tier for the Axiom-backed admin audit trail
  • admin-only; no change to NextAuth DEBUG_AUTH behavior and no new schema

Notes

  • The event is emitted via stdout and shipped to the vercel dataset in Axiom, powering the Admin Access Security dashboard login panels.

Validation

  • pnpm --filter web lint
  • pnpm --filter web typecheck
  • git diff --check

Comment thread apps/web/src/lib/user/server.ts
@kilo-code-bot

kilo-code-bot Bot commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Executive Summary

The previous suggestion was resolved in 287c862: the admin_login_succeeded audit event now emits only after the WorkOS SSO-authority assertions, and the incremental change introduces no new issues.

Files Reviewed (1 files)
  • apps/web/src/lib/user/server.ts
Previous Review Summary (commit 0132784)

Current summary above is authoritative. Previous snapshots are kept for context only.

Previous review (commit 0132784)

Status: 1 Issue Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 0
SUGGESTION 1
Issue Details (click to expand)

SUGGESTION

File Line Issue
apps/web/src/lib/user/server.ts 997 admin_login_succeeded audit event is emitted before the WorkOS SSO-authority assertion that can still fail the login
Files Reviewed (1 files)
  • apps/web/src/lib/user/server.ts - 1 issue

Fix these issues in Kilo Cloud


Reviewed by kimi-k3 · Input: 31.8K · Output: 5.6K · Cached: 216K

Review guidance: REVIEW.md from base branch main

@pandemicsyn
pandemicsyn merged commit 6cb2b79 into main Aug 7, 2026
13 of 15 checks passed
@pandemicsyn
pandemicsyn deleted the feat/cloud-agent-container-billing branch August 7, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants