You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
Issue: The route() method in Hono only accepts a maximum of 2 parameters, making it impossible to explicitly add middleware like authMiddleware within route().
Having like two "top-level" hono apps one that is public and one that is private (private would inherit from the public one with the addition of authMiddleware requiring an auth_token).
Or we can move the authMiddleware into the middleware array of the createRoute function?
As we will have to define all routes using openapi already to document them, I do think we can just try the middleware array and see if it works, if not, then we can think about other approaches.
Original conversation: #90 (comment)
Summary:
Issue: The route() method in Hono only accepts a maximum of 2 parameters, making it impossible to explicitly add middleware like authMiddleware within route().
Potential solution:
Middleware array:
https://github.com/honojs/middleware/tree/main/packages/zod-openapi#configure-middleware-for-each-endpoint
The text was updated successfully, but these errors were encountered: