You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: protected-pages/sending-data.mdx
-35Lines changed: 0 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,9 +10,6 @@ When implementing protected pages, your system returns user data in a specific f
10
10
11
11
```tsx
12
12
typeUser= {
13
-
expiresAt?:number;
14
-
groups?:string[];
15
-
content?:Record<string, any>;
16
13
apiPlaygroundInputs?: {
17
14
header?:Record<string, any>;
18
15
query?:Record<string, any>;
@@ -22,38 +19,6 @@ type User = {
22
19
};
23
20
```
24
21
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.
0 commit comments