Skip to content

Login fails with req.session.regenerate is not a function #2194

Open
@slysiou

Description

@slysiou

Issue Description

Impossible to login on the dashboard after upgrade on 4.1.3.
It was working 4.1.2. No issue after downgrading on 4.1.2

Steps to reproduce

In nodejs server code:
const dashboard = new ParseDashboard(dashboardConfig,{allowInsecureHTTP: true});
app.use('/dash', dashboard);

Fill the login form and submit.

Actual Outcome

TypeError: req.session.regenerate is not a function
at SessionManager.logIn (/home/demo/work/dkb/dkb-backend/node_modules/passport/lib/sessionmanager.js:28:15)
at IncomingMessage.req.login.req.logIn (/home/demo/work/dkb/dkb-backend/node_modules/passport/lib/http/request.js:39:26)
at Strategy.strategy.success (/home/demo/work/dkb/dkb-backend/node_modules/passport/lib/middleware/authenticate.js:256:13)
at verified (/home/demo/work/dkb/dkb-backend/node_modules/passport-local/lib/strategy.js:83:10)
at Strategy._verify (/home/demo/work/dkb/dkb-backend/node_modules/parse-dashboard/Parse-Dashboard/Authentication.js:41:7)
at Strategy.authenticate (/home/demo/work/dkb/dkb-backend/node_modules/passport-local/lib/strategy.js:88:12)
at attempt (/home/demo/work/dkb/dkb-backend/node_modules/passport/lib/middleware/authenticate.js:369:16)
at authenticate (/home/demo/work/dkb/dkb-backend/node_modules/passport/lib/middleware/authenticate.js:370:7)
at Layer.handle [as handle_request] (/home/demo/work/dkb/dkb-backend/node_modules/express/lib/router/layer.js:95:5)
at next (/home/demo/work/dkb/dkb-backend/node_modules/express/lib/router/route.js:144:13)

Dashboard

  • Parse Dashboard version: 4.1.3
  • Browser (Safari, Chrome, Firefox, Edge, etc.): Chrome, Firefox

Server

  • Parse Server version: 5.2.4
  • Operating system: Linux
  • Local or remote host (AWS, Azure, Google Cloud, Heroku, Digital Ocean, etc): local

Database

  • System (MongoDB or Postgres): mongo
  • Database version: last on dockerhub
  • Local or remote host (MongoDB Atlas, mLab, AWS, Azure, Google Cloud, etc): local container

Metadata

Metadata

Assignees

No one assigned

    Labels

    type:bugImpaired feature or lacking behavior that is likely assumed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions