-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feat: add identity (ORM-1261) #24
Conversation
ORM-1261 [Client] Option to specify a custom unique ID
As an Orama user, I want to integrate Orama on my website and define a custom unique ID, so that Orama can track data and connect multiple search sessions to the same known user. (The provided id will be called Possible approaches (one, both, more?): Option 1: call a dedicated method to identify a user as soon as their ID is known import client from 'oramacloud/client'
// as soon as we have the unique user ID...
window.addEventListener('login-performed', e => {
client.identify(e.my_user_id)
})
window.addEventListener('logout-performed', e => {
client.clearSession()
}) Option 2: pass an option to Orama Client initialization
|
Co-authored-by: Fausto Quaggia <[email protected]>
…cloud-client into feat-add-identity
@micheleriva I would appreciate if you could double-check this implementation.
I tried to follow the current design but could eventually fail.
Task: ORM-1261 : [Client] Option to specify a custom unique ID