feature: new dashboard workos auth for dashboard login, dashboard optional in site config, sync server for dashboard, workos and dashboard docs updated

This commit is contained in:
Wayne Sutton
2025-12-29 22:11:52 -08:00
parent f6c9478c9d
commit e8d09fcce2
47 changed files with 15058 additions and 193 deletions

View File

@@ -0,0 +1,66 @@
---
name: WorkOS Setup
overview: Complete WorkOS AuthKit integration for the dashboard by creating the Callback page, adding auth protection to Dashboard, and adding the callback route.
todos:
- id: create-callback
content: Create src/pages/Callback.tsx with auth redirect handling
status: completed
- id: add-callback-route
content: Add /callback route handling to src/App.tsx
status: completed
- id: update-dashboard
content: Add WorkOS auth protection to Dashboard.tsx
status: completed
- id: test-flow
content: Test authentication flow locally
status: completed
- id: todo-1767049823884-2nns40kqq
content: ""
status: pending
---
# WorkOS AuthKit Setup Plan
## Current Status
| Step | Description | Status |
| -------- | ----------------------------------- | ------------------ |
| Part 1-2 | Create WorkOS account and configure | Done |
| Part 3 | Install dependencies | Done |
| Part 4 | Environment variables | Done |
| Part 5 | Convex auth config | Done |
| Part 6 | Update main.tsx | Done |
| Part 7 | Create Callback route | Missing |
| Part 8 | Protected Dashboard | Needs auth wrapper |
| Part 9 | Add routes to App.tsx | Missing /callback |
| Part 10 | Test | Pending |
---
## Tasks
### 1. Create Callback.tsx (Part 7)
Create `src/pages/Callback.tsx` that handles OAuth callback and redirects to dashboard.
### 2. Add /callback route to App.tsx (Part 9)
Add callback route handling similar to how dashboard is handled.
### 3. Update Dashboard.tsx (Part 8)
Wrap existing dashboard with auth guards using Authenticated, Unauthenticated, and AuthLoading from convex/react.
### 4. Test (Part 10)
Test the full authentication flow locally.
---
## Files
| File | Action |
| ----------------------- | ------------------- |
| src/pages/Callback.tsx | Create |
| src/App.tsx | Add /callback route |
| src/pages/Dashboard.tsx | Add auth wrapper |

View File

@@ -27,6 +27,8 @@ alwaysApply: true
- Be casual unless otherwise specified
- you are a super experienced full-stack and AI developer super experienced in React, Vite, Bun, Clerk, workos, Resend, TypeScript, and Convex.dev
- Youre an experienced AI developer with deep expertise in convex.dev, OpenAI, and Claude, following best practices for building AI powered and full-stack SaaS applications, react applications and social network platforms.
- you are an expert in all things workos AuthKit https://workos.com/docs/authkit/vanilla/nodejs and workos docs https://workos.com/docs
- you are an expert setting up Convex & WorkOS AuthKit https://docs.convex.dev/auth/authkit/
- follow the vercel Web Interface Guidelines
https://raw.githubusercontent.com/vercel-labs/web-interface-guidelines/refs/heads/main/AGENTS.md and https://vercel.com/design/guidelines

View File

@@ -41,6 +41,8 @@ Before implementing any solution, follow this reflection process:
• End-to-End Type Support with TypeScript: https://docs.convex.dev/understanding/best-practices/typescript
• Convex Best Practices: https://docs.convex.dev/understanding/best-practices/
• Convex Schema Validation: https://docs.convex.dev/database/schemas
• workos AuthKit https://workos.com/docs/authkit/vanilla/nodejs and workos docs https://workos.com/docs
• you are an expert setting up Convex & WorkOS AuthKit https://docs.convex.dev/auth/authkit/