parse-community / parse-community/parse-dashboard
Login fails with `req.session.regenerate is not a function`
A pull request for this has already been merged.
- #2196 by @mtrezza — merged
- Dominant language
- JavaScript
- Stars
- 3.8k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
Description
- [X ] I am not disclosing a vulnerability.
- [ X] I am not just asking a question.
- [ X] I have searched through existing issues.
- [ X] I can reproduce the issue with the latest versions of Parse Server and Parse Dashboard.
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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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