WithMiddlewareAuthRequiredOptions: {
    middleware?: NextMiddleware;
    returnTo?: string | ((req) => Promise<string> | string);
}

Pass custom options to WithMiddlewareAuthRequired.

Type declaration

  • Optional middleware?: NextMiddleware
  • Optional returnTo?: string | ((req) => Promise<string> | string)