scout-extended
scout-extended copied to clipboard
EngineManager doesn't honor scout.identify configuration
- 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
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
Does anyone know a workaround for the issue?
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.