mirror of
https://github.com/stack-auth/stack.git
synced 2026-06-04 21:04:37 +08:00
The gate delayed flushes until an access token resolved, but sendBatch already resolves the session itself via _getSession() at send time, so _lastKnownAccessToken was a redundant readiness check that caused head-of-session events to be silently dropped on slow auth init and suppressed uploads entirely when token fetch failed. <!-- Make sure you've read the CONTRIBUTING.md guidelines: https://github.com/stack-auth/stack-auth/blob/dev/CONTRIBUTING.md --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Simplified analytics, session-replay, and event-tracking to stop periodic background access-token refreshes; flushing now occurs based on buffered data and lifecycle triggers. * **Bug Fixes** * Anonymous-user fallback tightened: anonymous identity is only applied when explicitly requested as "anonymous-if-exists," preventing unintended anonymous attribution. * **Tests** * Updated timing helper and removed token callback from test setups to align with the new flush behavior. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|---|---|---|
| .. | ||
| cjs-test | ||
| convex | ||
| demo | ||
| docs-examples | ||
| e-commerce | ||
| js-example | ||
| lovable-react-18-example | ||
| middleware | ||
| react-example | ||
| supabase | ||