From b59d5b4fb645b5384d3bf340b0b73a096947e800 Mon Sep 17 00:00:00 2001 From: ifedapoolarewaju Date: Thu, 27 Feb 2020 18:45:12 +0100 Subject: [PATCH] companion: use state in session in tests --- packages/@uppy/companion/test/mockserver.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/@uppy/companion/test/mockserver.js b/packages/@uppy/companion/test/mockserver.js index e908381a39..9ca19c437f 100644 --- a/packages/@uppy/companion/test/mockserver.js +++ b/packages/@uppy/companion/test/mockserver.js @@ -2,7 +2,7 @@ const { app } = require('../src/standalone') const express = require('express') const session = require('express-session') -var authServer = express() +const authServer = express() authServer.use(session({ secret: 'grant', resave: true, saveUninitialized: true })) authServer.all('*/callback', (req, res, next) => { @@ -11,7 +11,7 @@ authServer.all('*/callback', (req, res, next) => { } next() }) -authServer.all('*/send-token', (req, res, next) => { +authServer.all(['*/send-token', '*/redirect'], (req, res, next) => { req.session.grant = { dynamic: { state: req.query.state || 'non-empty-value' } } next() })