-
Notifications
You must be signed in to change notification settings - Fork 531
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
feat(createInsightsMiddleware): support authenticatedUserToken
#5997
Conversation
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 4802b7b:
|
f82b8c7
to
3cc7d0c
Compare
const tokenBeforeInit = | ||
authenticatedUserTokenBeforeInit || userTokenBeforeInit; | ||
const queuedToken = queuedAuthenticatedUserToken || queuedUserToken; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all could be simpler but it can be tackled in a separate refactoring PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
refactor can be later
This supports the new
authenticatedUserToken
from Search Insights.When provided, it takes precedence over the
userToken
. When not, or when unset, theuserToken
is used.Note
The code and tests are getting a bit more complicated than they could, but I didn't want to make a refactor in this PR to avoid complexifying the diffs. I'll do it in a separate one.
https://algolia.atlassian.net/browse/FX-2707