parse-community / parse-community/parse-dashboard

Login fails with `req.session.regenerate is not a function`

Open
#2,194 9 comments 0 reactions 0 assignees View on GitHub

A pull request for this has already been merged.

  • #2196 by @mtrezza — merged
type:bug
Dominant language
JavaScript
Stars
3.8k
Forks
1.4k
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the dashboard login using the ParseDashboard setup in the issue and inspect Parse-Dashboard/Authentication.js alongside the reported Passport stack frames. Compare the 4.1.3 and 4.1.2 behavior, then verify the fix against the login flow; merged pull request #2196 indicates that work has already moved elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.