Skip to content

Error: OAuthStrategy requires session support #406

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
sethlesky opened this issue Jul 30, 2014 · 2 comments
Closed

Error: OAuthStrategy requires session support #406

sethlesky opened this issue Jul 30, 2014 · 2 comments

Comments

@sethlesky
Copy link

Using the latest generator (2.0.7), I'm getting the following error when attempting to signup/login with twitter. This occurs after updating an existing project that had oauth working, and when generating a new project.

Error: OAuthStrategy requires session support. Did you forget app.use(express.session(...))? at Strategy.OAuthStrategy.authenticate (/Users/sethlesky/code/dopcast/app-update/node_modules/passport-twitter/node_modules/passport-oauth1/lib/strategy.js:120:41) at Strategy.authenticate (/Users/sethlesky/code/dopcast/app-update/node_modules/passport-twitter/lib/strategy.js:85:40) at attempt (/Users/sethlesky/code/dopcast/app-update/node_modules/passport/lib/middleware/authenticate.js:337:16) at Object.authenticate [as handle] (/Users/sethlesky/code/dopcast/app-update/node_modules/passport/lib/middleware/authenticate.js:338:7) at next_layer (/Users/sethlesky/code/dopcast/app-update/node_modules/express/lib/router/route.js:103:13) at Route.dispatch (/Users/sethlesky/code/dopcast/app-update/node_modules/express/lib/router/route.js:107:5) at c (/Users/sethlesky/code/dopcast/app-update/node_modules/express/lib/router/index.js:195:24) at Function.proto.process_params (/Users/sethlesky/code/dopcast/app-update/node_modules/express/lib/router/index.js:251:12) at next (/Users/sethlesky/code/dopcast/app-update/node_modules/express/lib/router/index.js:189:19) at Function.proto.handle (/Users/sethlesky/code/dopcast/app-update/node_modules/express/lib/router/index.js:234:5)
@sethlesky
Copy link
Author

My .yo-rc.json:

{
  "generator-angular-fullstack": {
    "insertRoutes": true,
    "registerRoutesFile": "server/routes.js",
    "routesNeedle": "// Insert routes below",
    "routesBase": "/api/",
    "pluralizeRoutes": true,
    "insertSockets": true,
    "registerSocketsFile": "server/config/socketio.js",
    "socketsNeedle": "// Insert sockets below",
    "filters": {
      "js": true,
      "html": true,
      "less": true,
      "ngroute": true,
      "bootstrap": true,
      "uibootstrap": true,
      "socketio": true,
      "mongoose": true,
      "auth": true,
      "oauth": true,
      "googleAuth": true,
      "facebookAuth": true,
      "twitterAuth": true
    }
  },
  "generator-ng-component": {
    "routeDirectory": "client/app/",
    "directiveDirectory": "client/app/",
    "filterDirectory": "client/app/",
    "serviceDirectory": "client/app/",
    "basePath": "client",
    "filters": [
      "ngroute"
    ],
    "extensions": [
      "js",
      "html",
      "less"
    ]
  }
}

@DaftMonk
Copy link
Member

DaftMonk commented Aug 1, 2014

Reverted a change in 2.0.8 to fix this

@DaftMonk DaftMonk closed this as completed Aug 1, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants