Fix OIDC audit logging and polish admin/dashboard UI - #33
Conversation
The audit-logging wrapper in app/api/auth/[...all]/route.ts only matched credential-auth paths (/sign-in/email, /sign-up/email), so OIDC sign-in (POST /sign-in/oauth2, GET /oauth2/callback/:providerId) never produced a user_login or user_registered entry. Move the logging into better-auth's databaseHooks (user.create.after, session.create.after), which fire uniformly at the DB layer for every auth method, including OIDC.
- Show full resource ID in admin logs instead of truncating it - Only render the system settings card for superadmins - Hide the stat-tile icon and quick-add label on small screens - Default the transactions filter panel to collapsed - Responsive stat-tile grid tweaks and misc formatting/copy fixes
|
Warning Review limit reached
Next review available in: 58 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (10)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Audit log fix:
app/api/auth/[...all]/route.tsonly matched credential-auth paths (/sign-in/email,/sign-up/email), so OIDC sign-in (POST /sign-in/oauth2,GET /oauth2/callback/:providerId) never produced auser_login/user_registeredentry in the admin log.databaseHooks(user.create.after,session.create.after) inlib/auth.ts, which fire uniformly at the database layer for every auth method (credentials and OIDC alike), instead of relying on brittle path string-matching.user_login.app/api/auth/[...all]/route.tsis now a trivial passthrough.UI polish:
Test plan
npx tsc --noEmitpassesnpm run lintpasses on changed filesnpm run buildsucceedsuser_registeredrow (no duplicate login), subsequent sign-in produces exactly oneuser_loginrow; test data cleaned up afterwardcreateOAuthUser/OIDC callbackcreateSessioncalls go through the sameinternalAdapterhooks as the credential flow🤖 Generated with Claude Code