Conversation
- Add new AuthSidebarPanel component with two states: - When cloud is disabled: shows a message with a button to navigate to the Cloud panel - When cloud is enabled: shows setup checklist and a "Setup Authentication" button that triggers the AI to configure Convex Auth with email/password - Add "Authentication" menu item (KeyRound icon) in the sidebar below "Cloud" on both desktop and mobile - Update CloudSidebarPanel to show an "Authentication" shortcut section when cloud is enabled - Update mobile-burger-menu to include Authentication in navigation items - Wire up handleSetupAuth in page.tsx that sends a detailed Convex Auth setup prompt to the AI via append() - Add mobile sheet for the auth panel - Covers programmatic setup: @convex-dev/auth installation, convex/auth.ts, schema.ts, http.ts, ConvexAuthProvider, sign-in/sign-up screens Co-authored-by: Rodrigo Figueroa <bidah@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| append({ | ||
| role: 'user', | ||
| content: `Please set up Convex authentication with email/password for my Expo React Native app. Follow these steps: | ||
|
|
||
| 1. Install the required packages: @convex-dev/auth and @auth/core | ||
| 2. Create convex/auth.ts with the Password provider from @convex-dev/auth/providers/Password | ||
| 3. Update convex/schema.ts to spread authTables from @convex-dev/auth/server inside defineSchema | ||
| 4. Create or update convex/http.ts to add authentication HTTP routes using auth.addHttpRoutes(http) | ||
| 5. Run npx @convex-dev/auth to generate JWT private key and JWKS, then configure SITE_URL as an environment variable | ||
| 6. Update the root app layout (_layout.tsx) to wrap with ConvexAuthProvider from @convex-dev/auth/react-native, using expo-secure-store as the storage option | ||
| 7. Create a sign-in screen and sign-up screen with email and password input fields using the useAuthActions hook |
There was a problem hiding this comment.
this should not be a message but rather a api call where these steps and code is added to the codebase that is sitting on the sandbox and then commited with our git integration.
|
Claude finished @bidah's task in 9m 46s —— View job Fixing Convex Auth Setup Implementation
What changedNew file: Replaced the The API route:
Updated: Updated: Updated:
|
Replace the chat message approach with a dedicated API route that writes Convex Auth files directly to the sandbox and commits via git: - Add /api/setup-convex-auth route that: - Installs @convex-dev/auth, @auth/core, expo-secure-store packages - Writes convex/auth.ts with Password provider - Writes convex/auth.config.ts with CONVEX_SITE_URL configuration - Smart-injects authTables into convex/schema.ts - Smart-injects auth HTTP routes into convex/http.ts - Updates app/_layout.tsx to use ConvexAuthProvider (replaces ConvexWrapper) - Creates app/(auth)/_layout.tsx, sign-in.tsx, and sign-up.tsx screens - Commits all changes via git - Update handleSetupAuth in page.tsx to call the new API - Update AuthSidebarPanel to handle async setup with loading/success/error states - Update AppSidebar to use () => Promise<void> type for onSetupAuth Co-authored-by: Rodrigo Figueroa <bidah@users.noreply.github.com>
Closes #6
Summary
AuthSidebarPanelcomponent with two states: cloud-disabled (shows navigate-to-cloud prompt) and cloud-enabled (shows setup checklist + AI-driven setup)append()sends a detailed Convex Auth programmatic setup prompt covering packages, schema, HTTP routes, ConvexAuthProvider, and sign-in/sign-up screensGenerated with Claude Code