lipp / lipp/doclets

Login-Issues, session can't be saved

Open
#337 7 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
206
Forks
12
PR merge metrics
No merged PRs in 30d

Description

There seems to be an issue with the session-handling at the moment when trying to log in:
```
TypeError: req.session.save is not a function
at Routes.authGithubCallback (/usr/src/app/lib/routes.js:15:15)
at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
at next (/usr/src/app/node_modules/express/lib/router/route.js:131:13)
at complete (/usr/src/app/node_modules/passport/lib/middleware/authenticate.js:250:13)
at /usr/src/app/node_modules/passport/lib/middleware/authenticate.js:257:15
at pass (/usr/src/app/node_modules/passport/lib/authenticator.js:421:14)
at Authenticator.transformAuthInfo (/usr/src/app/node_modules/passport/lib/authenticator.js:443:5)
at /usr/src/app/node_modules/passport/lib/middleware/authenticate.js:254:22
at /usr/src/app/node_modules/passport/lib/http/request.js:60:7
at pass (/usr/src/app/node_modules/passport/lib/authenticator.js:267:43)
at serialized (/usr/src/app/node_modules/passport/lib/authenticator.js:276:7)
at /usr/src/app/lib/routes.js:394:9
at model. (/usr/src/app/node_modules/mongoose/lib/document.js:1913:20)
at next_ (/usr/src/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:89:34)
at fnWrapper (/usr/src/app/node_modules/mongoose/node_modules/hooks-fixed/hooks.js:186:18)
at /usr/src/app/node_modules/mongoose/lib/model.js:3361:16
```
With the following on reload:
```
InternalOAuthError: Failed to fetch user profile
at /usr/src/app/node_modules/passport-github2/lib/strategy.js:96:19
at passBackControl (/usr/src/app/node_modules/passport-github2/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:123:9)
at IncomingMessage. (/usr/src/app/node_modules/passport-github2/node_modules/passport-oauth2/node_modules/oauth/lib/oauth2.js:143:7)
at emitNone (events.js:72:20)
at IncomingMessage.emit (events.js:166:7)
at endReadableNT (_stream_readable.js:905:12)
at nextTickCallbackWith2Args (node.js:441:9)
at process._tickCallback (node.js:355:17)
```

Contributor guide

No contributing guide indexed for this repository

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

Start at lib/routes.js:15 and reproduce the GitHub login flow that triggers the session error. Compare the initial login failure with the reload-related InternalOAuthError in the report, then verify that login completes, the session is saved, and reload no longer fails.

Written by the indexing model from the issue text.

Assessment

Tech stack
express, javascript
Domain
authentication, backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.