bnoguchi/mongoose-auth — Issue #75: rememberTokenSecret of 'twitter' is promising: requestTokenSecret: however, the step returns nothing
Author: rohitcolinrao
Created: 2012-02-02 03:54:47+00:00
State: open

I'm getting the following error when I try and run a twitter auth:

Error: Step rememberTokenSecret of `twitter` is promising: requestTokenSecret ; however, the step returns nothing. Fix the step by returning the expected values OR by returning a Promise that promises said values.

... not sure what's up. here is my code, any thoughts?

var express = require('express')
, routes = require('./routes')
, util = require('util')
, io = require('socket.io')
, users = require('./lib/users')
, mongoose = require('mongoose')
, Schema = mongoose.Schema
, ObjectId = mongoose.SchemaTypes.ObjectId
, conf = require('./lib/oauth_providers')
, mongooseAuth = require('mongoose-auth');

//db
mongoose.connect("mongodb://user:pass@mongourl.com:10030");

//db user schema
var UserSchema = new Schema({})
, User;
//db users setup
UserSchema.plugin(mongooseAuth, {
everymodule: {
everyauth: {
User: function() {
return User;
}
}
},
facebook: {
everyauth: {
myHostname: 'http://dev.xyz.com:3000',
appId: conf.fb.appId,
appSecret: conf.fb.appSecret,
redirectPath: '/test1'
}
},
twitter: {
everyauth: {
myHostname: 'http://dev.xyz.com:3000',
consumerKey: conf.twit.consumerKey,
consumerSecret: conf.twit.consumerSecret,
redirectPath: '/test1'
}
}
});
mongoose.model('User', UserSchema);

User = mongoose.model('User');

var app = module.exports = express.createServer();

// App Configuration
app.configure(function(){
app.set('views', dirname + '/views');
app.set('view engine', 'jade');
app.use(express.bodyParser());
app.use(express.cookieParser());
app.use(express.session({secret: "90ndsj9dfdsf"}));
app.use(mongooseAuth.middleware());
app.use(express.methodOverride());
app.use(app.router);
app.use(express.static(dirname + '/public'));
});

mongooseAuth.helpExpress(app);

app.configure('development', function(){
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
});

app.configure('production', function(){
app.use(express.errorHandler());
});

// Routes
app.get('/test1', routes.index);

app.listen(3000);
console.log("Express server listening on port %d in %s mode", app.address().port, app.settings.env);