Open
Description
Is your feature request related to a problem? Please describe.
I have user restricted data in my indexes but the only way to access it is using a secured API key.
But actually the searchClient is created via useAlgoliaRef() that use the global search key.
Describe the solution you'd like
I need a way to pass the apiKey to the useAlgoliaRef() composable
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
Baroshem commentedon Sep 9, 2024
Hey there,
What about passing index as a parameter for
useAlgoliaSearch
composable? https://algolia.nuxtjs.org/getting-started/usage#usealgoliasearchThe one passed in the composable should be applied before the global one
Splinteer commentedon Sep 9, 2024
Because the index doesn't change, and if you want user restricted data you must use a different api key.
Cf: https://www.algolia.com/doc/guides/security/api-keys/how-to/user-restricted-access-to-data
Baroshem commentedon Sep 19, 2024
Ahh I see, makes sense.
Would you be interested in contributing to the module with this change? I can provide the help if needed :)