Skip to content
Discussion options

You must be logged in to vote

Hello @samburgers ,

thank you for the very interesting question.
According to the documentation, checkJwt is the Handler created by auth() method, specified here:
https://github.com/auth0/node-oauth2-jwt-bearer/blob/0b65192/packages/express-oauth2-jwt-bearer/src/index.ts#L62

That Handler has the usual signature for express:

(req: Request, res: Response, next: NextFunction) => Promise<void>

Request and Response are the entities available to Middleware, so you can create one the following way:

const myJWTMiddleware = createMiddleware({
  input: z.object({}),
  middleware: async ({request, response}) => {
    const next = (e?: Error) => {
      if (e) {
        throw e;
      }
    };
    await

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@samburgers
Comment options

Answer selected by RobinTail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
enhancement New feature or request
2 participants