Identifying users
To create a unique config for each user on your API, you first need to understand who the active user is. To achieve this, you will set an auth token on the frontend that Vizzly will take and pass through to your API when the Query Engine attempts to fetch the config.
To set the auth token, you need to modify the queryEngineEndpoint
property to pass through a custom header named Auth-Remote-Config-Token
.
<Vizzly.Dashboard
queryEngineEndpoint={{
// URL of the your Query Engine
endpoint: 'https://vizzly-query-engine.my-company.org',
customHeaders: () => ({
'Auth-Remote-Config-Token': << TOKEN >>,
}),
}}
// Other react dashboard props...
/>
Where << TOKEN >>
is any string token you wish to identify a user and grant access to a dynamic config from your remote endpoint.
Next, we'll go through the setup steps for self-hosted Query Engine Project