Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

identify should not allow already identified users #173

Closed
1 of 3 tasks
marandaneto opened this issue Aug 29, 2024 · 1 comment · Fixed by #186
Closed
1 of 3 tasks

identify should not allow already identified users #173

marandaneto opened this issue Aug 29, 2024 · 1 comment · Fixed by #186
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@marandaneto
Copy link
Member

Description

Relates to PostHog/posthog-android#108
Relates to PostHog/posthog-js#524

const isKnownAnonymous = this.persistence.get_user_state() === 'anonymous' is the check where we know if calling identify again is allowed or not.
If the user is already identified, calling identify again isn't allowed, if that's intentional, you should call alias instead.

If you want to identify another user again, you have to call reset first.
https://posthog.com/docs/product-analytics/identify#3-reset-after-logout

There are more restrictions described here.

By not doing this, we might be merging users wrongly and we'll likely get a support request to split persons.

This has to be done on the other SDKs as well such as:

@marandaneto marandaneto added enhancement New feature or request help wanted Extra attention is needed labels Aug 29, 2024
@marandaneto
Copy link
Member Author

Ideally done with #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant