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
// The ctx here transforms from Context<HonoEnv> to Context<HonoEnv & WithAuthenticatedRequest>
app.get('/protected', requireAuth, async (ctx) => {});
However, this is currently impossible to do with the use approach:
const app = new OpenAPIHono<HonoEnv>();
app.use(route.getRoutingPath(), requireAuth);
// The ctx here only has Context<HonoEnv>
app.openapi(route, async (ctx) => {});
And I cannot find apparent workaround. If I manually type the ctx, it will lose input/output info.
McAllaster, mbarneyjr, redshoga, SakoHovaguimian, lukesthl and 7 moredavidchalifoux