Open History to see the last commit
1import { createStart } from '@tanstack/react-start';
2import { authkitMiddleware } from '@workos/authkit-tanstack-react-start';
3β
4/**
5 * Configure TanStack Start with AuthKit middleware.
6 * The middleware runs on every server request and provides auth context.
7 */
8export const startInstance = createStart(() => {
9 return {
10 // Run AuthKit middleware on every request
11 requestMiddleware: [authkitMiddleware()],
12 };
13});