Purpose
@wacht/react-router/server exposes thin server-auth helpers on top of @wacht/backend.
These helpers are request-based. They do not provide a middleware serialization layer like the Next.js package.
Imports
Exported helpers
getAuth(request, options?)
Returns normalized auth for the current request.
requireAuth(request, options?)
Loads auth and immediately applies auth.protect().
authenticateRequest(request, options?)
Returns both normalized auth and response headers that must be forwarded.
headers into the final response.
Example:
authFromHeaders(headers)
Deserializes normalized auth from headers that already contain the backend auth transport header.
This is only useful if your request pipeline already persisted those headers.
Returned auth shape
The auth object isWachtAuth from @wacht/backend:
