Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,23 @@
## vNEXT (not yet released)

## v3.15.2

### `@liveblocks/client`

- Deprecate the `engine` option on `enterRoom()`. This flag no longer has any
effect.

### `@liveblocks/react`

- Deprecate the `engine` prop on `RoomProvider`. This flag no longer has any
effect.

### `@liveblocks/node`

- Deprecate the `engine` option on `createRoom()`. This flag no longer has any
effect.
- Stop sending the `engine` field in the room creation request body.

## v3.15.1

### `@liveblocks/react-ui`
Expand Down
29 changes: 24 additions & 5 deletions docs/pages/api-reference/liveblocks-node.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,15 @@ const { body, status } = await liveblocks.identifyUser(
);
```

<Banner title="Don't cache tokens" type="warning">

Never cache your access token authentication endpoint, as your client will not
function correctly. The Liveblocks client will cache results for you, only
making requests to the endpoint if necessary, such as when the token has
expired.

</Banner>

##### Granting ID token permissions

You can pass additional options to `identifyUser`, enabling you to create
Expand Down Expand Up @@ -230,8 +239,8 @@ assigning group permissions.
These are arbitrary identifiers that make sense to your app, and that you can
refer to in the [Permissions REST API][] when assigning group permissions.

`organizationId` (optional) is the organization for this user, will be set to `default` if
not provided.
`organizationId` (optional) is the organization for this user, will be set to
`default` if not provided.

`userInfo` (optional) is any custom JSON value, which you can use to attach
static metadata to this user’s session. This will be publicly visible to all
Expand Down Expand Up @@ -323,6 +332,15 @@ const session = liveblocks.prepareSession(
);
```

<Banner title="Don't cache tokens" type="warning">

Never cache your access token authentication endpoint, as your client will not
function correctly. The Liveblocks client will cache results for you, only
making requests to the endpoint if necessary, such as when the token has
expired.

</Banner>

##### Granting access token permissions

Using `session.allow()`, you can grant full or read-only permissions to the user
Expand Down Expand Up @@ -353,10 +371,11 @@ session.allow("design-room:*", session.FULL_ACCESS);
</Banner>

Additionally, you can pass additional options to `prepareSession`, enabling you
to create complex permissions using [organizations](/docs/authentication/organizations) and
to create complex permissions using
[organizations](/docs/authentication/organizations) and
[accesses](/docs/authentication/access-tokens/permissions). For example, this
user can only see resources in the `acme-corp` organization, and they're part of a
`marketing` group within it.
user can only see resources in the `acme-corp` organization, and they're part of
a `marketing` group within it.

```ts
const session = liveblocks.prepareSession(
Expand Down
14 changes: 12 additions & 2 deletions docs/pages/api-reference/liveblocks-react.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -332,8 +332,10 @@ function App() {
>
The URL of your back end’s [authentication endpoint](/docs/authentication)
as a string, or an async callback function that returns a Liveblocks token
result. Either `authEndpoint` or `publicApiKey` are required. Learn more
about [using a URL string](#LiveblocksProviderAuthEndpoint) and [using a
result. The result is cached by the Liveblocks client, and called fresh only
when necessary, so never cache it yourself. Either `authEndpoint` or
`publicApiKey` are required. Learn more about [using a URL
string](#LiveblocksProviderAuthEndpoint) and [using a
callback](#LiveblocksProviderCallback).
</PropertiesListItem>
<PropertiesListItem name="publicApiKey" type="string">
Expand Down Expand Up @@ -475,6 +477,14 @@ function App() {
}
```

<Banner title="Don't cache tokens" type="warning">

Never cache your authentication endpoint, as your client will not function
correctly. The Liveblocks client will cache results for you, only making
requests to the endpoint if necessary, such as when the token has expired.

</Banner>

#### LiveblocksProvider with auth endpoint callback [#LiveblocksProviderCallback]

If you need to add additional headers or use your own function to call your
Expand Down
Loading
Loading