Tempo
Tempo
HHono
Created by Tempo on 5/23/2024 in #help
Having middleware routes in RPC
Hi, I'm setting up honojs as the API of a SPA, with authjs as authentication library using the honojs middleware (https://github.com/honojs/middleware/tree/main/packages/auth-js) I have the auth and RPC setup in the following way
app.use('/auth/*', authHandler());
app.use('*', verifyAuth());

const routes = app.route('/users', users);
export type AppType = typeof routes;
app.use('/auth/*', authHandler());
app.use('*', verifyAuth());

const routes = app.route('/users', users);
export type AppType = typeof routes;
but I wish I could get the auth endpoints (created by the authHandler) in the RPC aswell. Is it possible ?
5 replies