You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure what's going on here exactly, but you can see in some conditions we are using cached traits from a previous identity and inserting them into an unrelated identity. Identity B should never have a name: "A" trait set.
id-trait-confusion-react.mov
The text was updated successfully, but these errors were encountered:
If I understand this issue right, it has nothing to do with caching.
The problem is
Identifying with user a stores returned traits locally
calling identify again with a new identity combines previously set traits with the request for the new identity. It does this to allow for users to set traits prior to identifying, this is a common requirement.
The solution I think is that if we call identify and the sdk is already identified it should clear out the traits and just use whatever is provided at that time.
Using a slightly-modified version of the React example here, I can reproduce the issue below Flagsmith/flagsmith-js-examples@main...rolodato:flagsmith-js-examples-repro-17cf4148:main
I'm not sure what's going on here exactly, but you can see in some conditions we are using cached traits from a previous identity and inserting them into an unrelated identity. Identity
B
should never have aname: "A"
trait set.id-trait-confusion-react.mov
The text was updated successfully, but these errors were encountered: