Loading...
Loading...
Integrate WorkOS AuthKit with React single-page applications. Client-side only authentication. Use when the project is a React SPA without Next.js or React Router.
npx skill4agent add workos/skills workos-authkit-reactSTART
│
├─► Fetch README (BLOCKING)
│ github.com/workos/authkit-react/blob/main/README.md
│ README is source of truth. Stop if fetch fails.
│
├─► Detect Build Tool
│ ├─ vite.config.ts exists? → Vite
│ └─ otherwise → Create React App
│
├─► Set Env Var Prefix
│ ├─ Vite → VITE_WORKOS_CLIENT_ID
│ └─ CRA → REACT_APP_WORKOS_CLIENT_ID
│
└─► Implement per README| Marker File | Build Tool | Env Prefix | Access Pattern |
|---|---|---|---|
| Vite | | |
| CRA | | |
{PREFIX}WORKOS_CLIENT_ID=client_...
{PREFIX}WORKOS_REDIRECT_URI=http://localhost:5173/callbackWORKOS_API_KEY.env.env.localnextreact-routerpnpm buildVITE_REACT_APP_main.tsxindex.tsx<App /><AuthKitProvider>