code: async function () {
          let redirectURL = ctx.url;
          try {
            redirectURL = encodeURIComponent(redirectURL);
          } catch (e) {
            // URIError: URI malformed
            // use source url
          }
          const loginURL = options.loginPath + '?redirect=' + redirectURL;
          debug('redirect to %s', loginURL);
          redirect(ctx, loginURL);
        }
docs: make next handle an Async Function so it can use await next in redirectHandle