release: WRNexusJS 0.5.0
This commit is contained in:
+33
@@ -0,0 +1,33 @@
|
||||
# WRNexusJS auth form and validation fix
|
||||
|
||||
Copy this patch over the WRNexusJS repository root (`E:\WireJS`) and allow matching files to be replaced.
|
||||
|
||||
## What this fixes
|
||||
|
||||
- Auth API files now export HTTP method handlers (`GET` / `POST`) instead of unsupported default-only handlers.
|
||||
- The package auth dispatcher exports `GET` and `POST`, so package-contributed API routes are callable by the runtime.
|
||||
- The sign-up form is intercepted by the `@wrnexus/validation` browser runtime instead of navigating the browser directly to the JSON API.
|
||||
- The same `signUpSchema` validates registration in the browser and in the showcase API route.
|
||||
- Shared auth HTTP handlers validate core request bodies with `parseBody(...)` from `@wrnexus/validation`.
|
||||
- Backend field errors and network/API failures are displayed in the form.
|
||||
- Successful registration redirects to `/sign-in`.
|
||||
- The in-memory auth showcase disables SQL migration bundling, so its production build does not require `config.db`.
|
||||
|
||||
## Run
|
||||
|
||||
```bash
|
||||
cd E:/WireJS
|
||||
bun install
|
||||
bun run format
|
||||
bun run check
|
||||
bun run validate:auth
|
||||
bun run auth:dev
|
||||
```
|
||||
|
||||
Open:
|
||||
|
||||
```text
|
||||
http://localhost:3000/sign-up
|
||||
```
|
||||
|
||||
Do not use `/api/auth/register` as the registration page. It is a POST-only JSON endpoint. Opening it directly with GET should now return a JSON `405 Method Not Allowed` response instead of an invalid server response.
|
||||
Reference in New Issue
Block a user