Today, we’re launching a new feature that enables people to create collaborative
experiences without setting up their own authentication endpoint.
Previously, developers had to create their own endpoint to be able to use
Liveblocks. While this is great for products that need to control who should
have access to different Liveblocks rooms, this also means that a majority of
people who want to add things like live cursors to their website or prototype
couldn’t do it because they have no easy way to set up their own authentication
endpoint.
With the client-side only mode, you can easily install Liveblocks into your
project by ensuring the public API key associated with
your Liveblocks account is activated.
You can then use Liveblocks in client-side only mode by using the publicApiKey
in the createClient
method when connecting to Liveblocks in your codebase.
import{ createClient }from"@liveblocks/client"; // Create a Liveblocks client and// replace this key with your public key// provided at https://liveblocks.io/dashboard/projects/{projectId}/apikeysconst client =createClient({publicApiKey:"pk_prod_xxxxxxxxxxxxxxxxxxxxxxxx",});