Othent JS SDK startTabSynching() function
Last updated 7 months ago
If and only if you set the option to persist and/or sync user details across tabs, you need to call startTabSynching() and make sure the cleanup function it returns is called once you no longer need the Othent instance you've created.
startTabSynching()
Othent
startTabSynching(): void;
import { Othent } from "@othent/kms"; const MyComponent = () => { const othent = useMemo(() => { return new Othent(options); }, [options]); useEffect(() => { const cleanupFn = othent.startTabSynching(); return () => { cleanupFn(); }; }, [othent]); }
persistLocalStorage