Skip to content

fix(insights): use latest appId and apiKey #6631

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

Merged
merged 1 commit into from
May 5, 2025

Conversation

aymeric-giraudet
Copy link
Member

@aymeric-giraudet aymeric-giraudet commented May 2, 2025

Summary

FX-3372

Fixes #6623

Result

We should use the latest appId and apiKey as the latter can be rotated

@aymeric-giraudet aymeric-giraudet requested review from a team, sarahdayan and shaejaz and removed request for a team May 2, 2025 13:50
Copy link

codesandbox-ci bot commented May 2, 2025

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 2f98639:

Sandbox Source
example-instantsearch-getting-started Configuration
example-react-instantsearch-getting-started Configuration
example-react-instantsearch-next-app-dir-example Configuration
example-react-instantsearch-next-routing-example Configuration
example-vue-instantsearch-getting-started Configuration

@aymeric-giraudet aymeric-giraudet force-pushed the fix/insights-latest-api-key branch from 0ac55f5 to 2f98639 Compare May 2, 2025 13:55
@aymeric-giraudet aymeric-giraudet merged commit d03d391 into master May 5, 2025
14 checks passed
@aymeric-giraudet aymeric-giraudet deleted the fix/insights-latest-api-key branch May 5, 2025 16:03
@Haroenv
Copy link
Contributor

Haroenv commented May 12, 2025

This makes sense, do we still use the initial appid,apikey then? can we change it so it's only retrieved in sendEvent itself?

@aymeric-giraudet
Copy link
Member Author

aymeric-giraudet commented May 12, 2025

@Haroenv Retrieving it when the middleware starts is only for old versions of search insights now, for this users will have to call init if they change their apiKey. For modern versions, we retrieve it each time in sendEvent, init wouldn't work anyway as we use the new signature to force headers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Updating Secured API key for react-instantsearch isn't updating the URL for insights (analytics) network call with correct API key
3 participants