Skip to content

Commit 2900f4f

Browse files
committed
fix: structure
1 parent 9a42564 commit 2900f4f

1 file changed

Lines changed: 11 additions & 3 deletions

File tree

src/content/docs/developer-tools/sdks/backend/remix-sdk.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -419,8 +419,12 @@ export const loader = async ({request}: LoaderFunctionArgs) => {
419419
return json({payload: "Refreshing tokens in the background"}, {headers});
420420
};
421421

422-
// Refresh tokens manually
423-
import { json, LoaderFunctionArgs, ActionFunctionArgs, redirect } from "@remix-run/node";
422+
```
423+
424+
To refresh tokens manually (e.g., before a redirect):
425+
426+
```typescript
427+
import { ActionFunctionArgs, redirect } from "@remix-run/node";
424428
import { getKindeSession } from "@kinde-oss/kinde-remix-sdk";
425429

426430
export const action = async ({request}: ActionFunctionArgs) => {
@@ -429,7 +433,11 @@ export const action = async ({request}: ActionFunctionArgs) => {
429433
return redirect("/profile", {headers});
430434
};
431435

432-
// Refresh after an update
436+
```
437+
438+
To refresh after a mutation and return updated data:
439+
440+
```typescript
433441
import { json, ActionFunctionArgs } from "@remix-run/node";
434442
import { getKindeSession } from "@kinde-oss/kinde-remix-sdk";
435443

0 commit comments

Comments
 (0)