Skip to content

Commit 18a1e4b

Browse files
committed
update what data is returned for customization
1 parent 9c0ac87 commit 18a1e4b

File tree

1 file changed

+0
-35
lines changed

1 file changed

+0
-35
lines changed

protected-pages/sending-data.mdx

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,6 @@ When implementing protected pages, your system returns user data in a specific f
1010

1111
```tsx
1212
type User = {
13-
expiresAt?: number;
14-
groups?: string[];
15-
content?: Record<string, any>;
1613
apiPlaygroundInputs?: {
1714
header?: Record<string, any>;
1815
query?: Record<string, any>;
@@ -22,38 +19,6 @@ type User = {
2219
};
2320
```
2421

25-
<ParamField
26-
path="expiresAt"
27-
type="number"
28-
>
29-
Session expiration time in **seconds since epoch**. If the user loads a page after this time, their stored data is automatically deleted and they must reauthenticate.
30-
<Warning><b>For JWT handshakes:</b> This differs from the JWT's `exp` claim, which determines when a JWT is considered invalid. Set the JWT `exp` claim to a short duration (10 seconds or less) for security. Use `expiresAt` for the actual session length (hours to weeks).</Warning>
31-
</ParamField>
32-
<ParamField
33-
path="groups"
34-
type="string[]"
35-
>
36-
A list of groups that the user belongs to. Pages with a matching `groups` field in their metadata will be visible to this user.
37-
38-
**Example**: User with `groups: ["admin", "engineering"]` can access pages tagged with either the `admin` or `engineering` groups.
39-
</ParamField>
40-
<ParamField
41-
path="content"
42-
type="object"
43-
>
44-
Custom data accessible in your `MDX` content via the `user` variable. Use this for dynamic personalization throughout your documentation.
45-
46-
**Example**:
47-
```json
48-
{ "firstName": "Ronan", "company": "Acme Corp", "plan": "Enterprise" }
49-
```
50-
51-
**Usage in `MDX`**:
52-
```mdx
53-
Welcome back, {user.firstName}! Your {user.plan} plan includes...
54-
```
55-
With the example `user` data, this would render as: Welcome back, Ronan! Your Enterprise plan includes...
56-
</ParamField>
5722
<ParamField
5823
path="apiPlaygroundInputs"
5924
type="object"

0 commit comments

Comments
 (0)