-
Notifications
You must be signed in to change notification settings - Fork 35
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)
adikari
Metadata
Metadata
Assignees
Labels
No labels