-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Description
Just a suggestion to make the hono app extendable. For example, adding jwtAuth middleware to all the routes. I've done this on my fork and it works fine.
it looks something like
const jwtAuthMiddleware = async (c, next) => {
const authHeader = c.req.header("Authorization")
jwt.verify(authHeader, Resource.JWTSecret)
...
}
const app = create({
tools: [echoTool],
model: anthropic("claude-3-7-sonnet-20250219"),
})
app.auth(jwtAuthMiddleware)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels