What is the correct way to guard group of routes with auth? #4102
Closed
florianmartens
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm using
@hono/zod-openapi
and thought I would be a good idea to define an authenticated router:I since learned that this will register the middleware multiple times. This will also make it really hard to have unauthed routes. What is the correct way to do this?
Beta Was this translation helpful? Give feedback.
All reactions