Skip to content

Commit

Permalink
companion: use state in session in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ifedapoolarewaju committed Feb 27, 2020
1 parent 7fc4490 commit b59d5b4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@uppy/companion/test/mockserver.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand All @@ -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()
})
Expand Down

0 comments on commit b59d5b4

Please sign in to comment.