stack/examples
BilalG1 b3ed56ee0c
Fix session recorder and even tracker access token fetch (#1331)
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 -->
2026-04-13 18:32:24 -07:00
..
cjs-test chore: update package versions 2026-04-13 11:31:28 -07:00
convex chore: update package versions 2026-04-13 11:31:28 -07:00
demo Fix session recorder and even tracker access token fetch (#1331) 2026-04-13 18:32:24 -07:00
docs-examples chore: update package versions 2026-04-13 11:31:28 -07:00
e-commerce chore: update package versions 2026-04-13 11:31:28 -07:00
js-example chore: update package versions 2026-04-13 11:31:28 -07:00
lovable-react-18-example chore: update package versions 2026-04-13 11:31:28 -07:00
middleware chore: update package versions 2026-04-13 11:31:28 -07:00
react-example chore: update package versions 2026-04-13 11:31:28 -07:00
supabase chore: update package versions 2026-04-13 11:31:28 -07:00