-
Notifications
You must be signed in to change notification settings - Fork 2
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
What is the right way to handle user session? #40
Comments
Hi @wilburx9, many thanks for reaching out. In your implementation, after the user logs in, do you re-initialize the client as well, or just call |
After the user logs in, I call:
And |
This issue has been addressed in v1.11.1. Additionally, if you have initialized the client before the user logged in, you can also just do:
to set the |
We run an experiment before the user log in and after they log in. We initialize the client like so:
Before the user logs in,
userAuth0Id
isnull
and callingexperiment?.variant(variantKey)
returns the expected variant.After logging in, we call the code above with a valid
userAuth0Id
. But the now logged-in user doesn't get the expected variant of the experiment that is assigned to theiruserId
, the properties in the object returned inexperiment?.variant(variantKey)
are justnull
. I have tried callingexperiment?.clear()
after login but that doesn't fix it.However, if you restart the app, they get the right values.
What is the right way to handle this?
I am using v1.11.0
The text was updated successfully, but these errors were encountered: