Skip to content

fix(auth): correctly identify posthog users via backend on load#40

Merged
jpdevhub merged 1 commit into
mainfrom
feat/oss-readiness-and-analytics
May 27, 2026
Merged

fix(auth): correctly identify posthog users via backend on load#40
jpdevhub merged 1 commit into
mainfrom
feat/oss-readiness-and-analytics

Conversation

@jpdevhub
Copy link
Copy Markdown
Owner

@jpdevhub jpdevhub commented May 27, 2026

Summary by cubic

Fixes posthog-js user identification by fetching the user profile from the backend and identifying on app load and auth changes. Removes fragile JWT-based identification to ensure consistent IDs and correct attribution.

  • Bug Fixes
    • Identify via api.getMe() when isAuthenticated(), using profile.id, email, and full_name.
    • Trigger identification on initial load and on auth-change events.
    • Remove JWT decoding from AuthPage and centralize identification in PostHogPageView.

Written for commit 621d0c9. Summary will update on new commits. Review in cubic

@vercel
Copy link
Copy Markdown

vercel Bot commented May 27, 2026

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

Project Deployment Actions Updated (UTC)
fresh-scan-ai Ready Ready Preview, Comment May 27, 2026 9:54am

@jpdevhub jpdevhub merged commit 22b74d5 into main May 27, 2026
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant