feat: [REL-11096] update context on login + fix api calls bug #386
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
When a user authenticates, update the internal client context to have the memberId + accountId we get back from the server. See the MoMI PR (link coming soon) for info as well, as that needs merged in before this. Oh yea, there was also this pesky api call bug we had been dealing with for a while that has been fixed now.
What does this PR do?
Updates the internal client context to be based around the authenticated user (memberId and accountId). This allows a few things:
Testing
See the testing steps in the MoMI PR and make sure that's all squared away. After logging in to the toolbar, navigate to the toolbar project in LaunchDarkly (message me if you are unsure where this is). Go to one of the flags for that project (one you know will be evaluated easily), and update it to have individual targeting for your account info. Save that, and the change should reflect in the toolbar when you refresh your page!
Type of Change
Related Jira issue: REL-11096: Add authenticated Context to internal toolbar client