Summary
Several auth API endpoints have OpenAPI annotations (#[utoipa::path]) that don't match the actual handler behavior. I discovered these while building a SvelteKit frontend against TrailBase v0.23.9.
- POST /api/auth/v1/reset_password/update/:password_reset_code
Docs say: password_reset_code is a URL path parameter, response is 200.
Actual behavior: The handler reads password_reset_code from the request body only (via Either), not from the URL path. The path parameter is ignored. Sending POST /api/auth/v1/reset_password/update/{code} returns 404. The working endpoint is POST /api/auth/v1/reset_password/update with the code in the JSON body. On success, it returns 303 (redirect), not 200.
Source reference: — the annotation says path = "/reset_password/update/:password_reset_code" but reset_password_update_handler extracts from Either.
- POST /api/auth/v1/register
Docs say: Response is 200.
Actual behavior: Returns 303 redirect on successful registration.
- GET /api/auth/v1/verify_email/confirm/:email_verification_code
Docs say: Response is 200.
Actual behavior: Returns 302 or 303 redirect on successful verification.
- POST /api/auth/v1/reset_password/request
Docs say: Response is 200.
Actual behavior: Returns a redirect on success (not 200).
Environment
TrailBase v0.23.9 (Docker: trailbase/trailbase:0.23.9)
trailbase JS client v0.9.0
Summary
Several auth API endpoints have OpenAPI annotations (#[utoipa::path]) that don't match the actual handler behavior. I discovered these while building a SvelteKit frontend against TrailBase v0.23.9.
Docs say: password_reset_code is a URL path parameter, response is 200.
Actual behavior: The handler reads password_reset_code from the request body only (via Either), not from the URL path. The path parameter is ignored. Sending POST /api/auth/v1/reset_password/update/{code} returns 404. The working endpoint is POST /api/auth/v1/reset_password/update with the code in the JSON body. On success, it returns 303 (redirect), not 200.
Source reference: — the annotation says path = "/reset_password/update/:password_reset_code" but reset_password_update_handler extracts from Either.
Docs say: Response is 200.
Actual behavior: Returns 303 redirect on successful registration.
Docs say: Response is 200.
Actual behavior: Returns 302 or 303 redirect on successful verification.
Docs say: Response is 200.
Actual behavior: Returns a redirect on success (not 200).
Environment
TrailBase v0.23.9 (Docker: trailbase/trailbase:0.23.9)
trailbase JS client v0.9.0