Hi I am using express framework to make site in node. I am trying to use facebox to represent a window in which use can be logged in so that the music on the site should not stop.
I use mongoose-auth / everyauth for authentication and cannot figure out how to do this.
I need to make the login page as partial, I think. I have the following: I think using loginLocals is the answer?
Does anyone have any ideas!?
var mongoose = require('mongoose') , Schema = mongoose.Schema , mongooseAuth = require('mongoose-auth'); var everyauth = require('everyauth') , Promise = everyauth.Promise; var UserSchema = new Schema({}); UserSchema.plugin(mongooseAuth, { everymodule: { everyauth: { User: function () { return User; } } }, password: { loginWith: 'email' , extraParams: { genre: String } , everyauth: { getLoginPath: '/login' , postLoginPath: '/login' , loginView: 'login.jade' , getRegisterPath: '/register' , postRegisterPath: '/register' , registerView: 'register.jade' , loginSuccessRedirect: '/' , registerSuccessRedirect: '/' , loginLocals: function(req, res) {
source share