- Move auth logic from page actions to dedicated API routes (/api/auth/register, /api/auth/login) — React Router page actions don't handle JSON fetch() properly - Remove server imports from page components - Verify registration start works end-to-end with PostgreSQL: WebAuthn challenge generated, user ID created, RP set to localhost Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
12 lines
522 B
TypeScript
12 lines
522 B
TypeScript
import { type RouteConfig, index, route } from "@react-router/dev/routes";
|
|
|
|
export default [
|
|
index("routes/home.tsx"),
|
|
route("auth/register", "routes/auth.register.tsx"),
|
|
route("auth/login", "routes/auth.login.tsx"),
|
|
route("auth/verify", "routes/auth.verify.tsx"),
|
|
route("auth/logout", "routes/auth.logout.tsx"),
|
|
route("api/auth/register", "routes/api.auth.register.ts"),
|
|
route("api/auth/login", "routes/api.auth.login.ts"),
|
|
route("users/:username", "routes/users.$username.tsx"),
|
|
] satisfies RouteConfig;
|