docs: function _loginCallback (privateDirectoryUrl, publicUrl, jwksClient, cookieName, cookieDomain) {
    return asyncWrap(async (req, res, next) => {
      // Get a JWT in a id_token query parameter = coming from a link in an email
      const linkToken = req.query.id_token
      if (linkToken) {
        const cookies = new Cookies(req, res)
        try {
          debug(`Verify JWT token from the query parameter`)
          await _verifyToken(jwksClient, linkToken)
          debug('JWT token from query parameter is ok, exchange it for a long term session token')
          const exchangedToken = await _exchangeToken(privateDirectoryUrl, linkToken)
          const payload = await _verifyToken(jwksClient, exchangedToken)
          debug('Exchanged token is ok, store it', payload)
          _setCookieToken(cookies, cookieName, cookieDomain, exchangedToken, payload)
        } catch (err) {
          // Token expired or bad in another way..
          // TODO: a way to display warning to user ? throw error ?
          debug('JWT token from query parameter is broken', err)
        }
        const reloadUrl = new URL(publicUrl + req.originalUrl)
        reloadUrl.searchParams.delete('id_token')
        debug('Reload current page without id_token query parameter', reloadUrl.toString())
        return res.redirect(reloadUrl.toString())
      }
      next()
    })
  }