This guide suites you if:
Oftentimes our partners already have existing user profiles they'd like to keep across their product. For such a case there's a way to switch all PeerBoard profiles to your custom profiles in all our surfaces - with an option to fallback to ours if there's no profile on your end.
Setup
To do so you can just provide an extra profile_url
parameter to your JWT token generated on the backend if you're using seamless login. And if you use our API to synchronize users you'll have to add this parameter there too.
Also, if you have a single page application you can do a smooth state transition without full page reload adding onCustomProfile
callback option to our frontend core package initialization code.
const options = {
// ...other options
onCustomProfile: (url) => {
// Make a transition to the profile page using your frontent routing component
router.push(url);
}
};
const forum = createForum(boardId, containerHTMLElement, options);
// We're suggesting to do cleanup everything the page dynamically, for example, on component unmount in React
componentWillUnmount () {
forum.destroy()
}
Extending profiles
If you are using your profiles instead of PeerBoard's, you can also enrich them using our APIs and include some of PeerBoard context in it. This is much recommended and here's the endpoint.
Have other ideas for deep integrations? Let us know in the comments!