feat: enhance login tracking and logout functionality

- Added session storage flag to track local login success, ensuring OAuth flows do not double track login events.
- Implemented tracking for logout events in both UserDropdown and AppSidebar components, resetting PostHog identity accordingly.
- Minor formatting adjustments in GoogleLoginButton and footer-new components for consistency.
This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-01-02 01:10:16 -08:00
parent 458c152032
commit d20aef2957
8 changed files with 84 additions and 4 deletions

View file

@ -14,7 +14,7 @@ export function GoogleLoginButton() {
trackLoginAttempt("google");
// IMPORTANT: Use the redirect-based authorize endpoint for cross-origin OAuth
// This fixes CSRF cookie issues in Firefox/Safari where cookies set via
// This fixes CSRF cookie issues in Firefox/Safari where cookies set via
// cross-origin fetch requests may not be sent on subsequent redirects.
// The authorize-redirect endpoint does a server-side redirect to Google
// and sets the CSRF cookie properly for same-site context.