Skip to content

Conversation

@ryanbonial
Copy link
Member

@ryanbonial ryanbonial commented Jan 30, 2026

Description

Added comprehensive logging to the authentication flow to improve debugging and traceability. The changes include detailed log messages at key points in the authentication process, such as initialization, token exchange, login/logout operations, and token refreshing.

What to review

  • Review the logger implementation in the auth store initialization
  • Check the logging points throughout the authentication flow
  • Verify appropriate log levels (debug, info, warn, error) are used for different scenarios
  • Review the test mocks for the logger to ensure tests run cleanly

Testing

Added logger mocks to all relevant test files to prevent actual logging during tests. The existing test coverage remains intact, with additional mocks to support the new logging functionality.

Fun gif

logger

@vercel
Copy link

vercel bot commented Jan 30, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
sdk-docs Ready Ready Preview, Comment Jan 30, 2026 3:58pm
sdk-kitchensink-react Ready Ready Preview, Comment Jan 30, 2026 3:58pm

Request Review

@github-actions
Copy link

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 95% (🎯 95%) 7834 / 8246
🟢 Statements 95% (🎯 95%) 7834 / 8246
🟢 Functions 96.23% (🎯 95%) 383 / 398
🟢 Branches 92.88% (🎯 90%) 2299 / 2475
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/core/src/auth/authStore.ts 85.65% 90.76% 100% 85.65% 134-135, 278-280, 286, 293-294, 383-417
packages/core/src/auth/handleAuthCallback.ts 97.7% 88.23% 100% 97.7% 73-74
packages/core/src/auth/logout.ts 100% 92.85% 100% 100%
packages/core/src/auth/refreshStampedToken.ts 59.18% 97.43% 84.61% 59.18% 84-139, 181-201, 206-233, 241-242, 256, 276-285, 300
packages/core/src/auth/subscribeToStateAndFetchCurrentUser.ts 98.55% 94.11% 100% 98.55% 69
Generated in workflow #2838 for commit bd0103d by the Vitest Coverage Report Action

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.

1 participant