hunk.code_window:  * @param {object} res
    * @param {function} next
    */
   module.exports = function sendToken (req, res, next) {
     const uppyAuthToken = req.companion.authToken
     // add the token to cookies for thumbnail/image requests
     tokenService.addToCookies(res, uppyAuthToken, req.companion.options, req.companion.provider.authProvider)
     const dynamic = (req.session.grant || {}).dynamic || {}
     const state = dynamic.state
     if (state) {
       const origin = oAuthState.getFromState(state, 'origin', req.companion.options.secret)
  
hunk.labels: keep keep keep keep keep replace replace keep keep keep keep keep
hunk.after_edit:   // some providers need the token in cookies for thumbnail/image requests
     if (req.companion.provider.needsCookieAuth) {
       tokenService.addToCookies(res, uppyAuthToken, req.companion.options, req.companion.provider.authProvider)
     }
  
hunk.file_path: packages/@uppy/companion/src/server/controllers/send-token.js
hunk.type: replace
file: const Uppy = require('@uppy/core')
  const Dashboard = require('@uppy/dashboard')
  const AwsS3 = require('@uppy/aws-s3')
  
  const uppy = Uppy({
    debug: true
  })
  
  uppy.use(Dashboard, {
    inline: true,
    target: 'body'
  })
  
  // No client side changes needed!
  uppy.use(AwsS3, { companionUrl: '/companion' })
  