Skip to content
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

EngineManager doesn't honor scout.identify configuration #323

Open
renanbr opened this issue Jul 6, 2023 · 3 comments · May be fixed by #338
Open

EngineManager doesn't honor scout.identify configuration #323

renanbr opened this issue Jul 6, 2023 · 3 comments · May be fixed by #338

Comments

@renanbr
Copy link

renanbr commented Jul 6, 2023

  • Laravel version: 9.48.0
  • Algolia Scout Extended version: 2.1.0
  • Algolia Client Version: 3.3.2
  • Language Version: 8.1.20

Description

Algolia analytics dashboard doesn't recognise user searches because the application doesn't send the X-Algolia-UserToken header when performing searches even when configuring SCOUT_IDENTIFY env var to true.

Steps To Reproduce

  • Make sure scout.identify configuration is true
  • Perform some searches with an authenticated user
  • Check latest requests headers in Algolia dashboard
@Shkeats
Copy link

Shkeats commented Dec 4, 2023

I've just run into this issue too. Relevant code is in vendor/laravel/scout/src/EngineManager.php defaultAlgoliaHeaders() method but it never gets executed.

Scout docs https://laravel.com/docs/10.x/scout#identifying-users

@szhorvath
Copy link

Does anyone know a workaround for the issue?

@renanbr
Copy link
Author

renanbr commented Feb 15, 2024

Does anyone know a workaround for the issue?

We override the EngineManager with a housemade class overriding the createAlgoliaDriver() method.

This approach made us able to fix scout.algolia.*_timeout configuration as well.

@szhorvath szhorvath linked a pull request Feb 20, 2024 that will close this issue
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 a pull request may close this issue.

3 participants