Comments (8)
hm, can't reproduce - try again, there were some changes recently. make sure your server.js file matches the example app, which was also recently changed. if still buggy, re-open
from derby-auth.
I'm not using that, but a minimal one from the README:
express = require 'express'
derby = require 'derby'
racer = require 'racer'
strategies =
google:
strategy: require('passport-google').Strategy
conf:
clientId: process.env.GOOGLE_KEY
clientSecret: process.env.GOOGLE_SECRET
returnURL: '/'
options =
domain: 'http://localhost:3000'
allowPurl: true
derby.use(derby.logPlugin)
racer.use(racer.logPlugin)
expressApp = express()
server = require('http').createServer expressApp
# The server-side store syncs data over Socket.IO
store = derby.createStore listen: server
expressApp
.use(express.static __dirname + '/public')
.use(store.modelMiddleware())
.use(require('derby-auth')(store, strategies, options))
.use(require('./hello').router())
server.listen 3000
from derby-auth.
git the latest push a shot, a3da0e6
from derby-auth.
You know what, I hit this issue too just recently - and there was no reason it should have been happening, so I just ran rm -rf node_modules/* && npm install
and it seemed ok... strange.
from derby-auth.
No cigar, using git.
from derby-auth.
I made some changes to my server.js and it works:
express = require 'express'
derby = require 'derby'
racer = require 'racer'
strategies =
google:
strategy: require('passport-google').Strategy
conf:
clientId: process.env.GOOGLE_KEY
clientSecret: process.env.GOOGLE_SECRET
returnURL: '/'
options =
domain: 'http://localhost:3000'
allowPurl: true
derby.use(derby.logPlugin)
racer.use(racer.logPlugin)
expressApp = express()
server = require('http').createServer expressApp
# The server-side store syncs data over Socket.IO
store = derby.createStore listen: server
expressApp
.use(express.favicon())
.use(require('gzippo').staticGzip(__dirname + '/public'))
.use(express.compress())
.use(express.cookieParser())
.use(store.sessionMiddleware
secret: process.env.SESSION_SECRET || 'default_secret'
cookie: {maxAge: 1000 * 60 * 60 * 24 * 365}
)
.use(store.modelMiddleware())
.use(require('derby-auth')(store, strategies, options))
.use(require('./hello').router())
server.listen 3000
from derby-auth.
Had the same issue, uncommented these use
s and it started working (at least got through this issue)
# Uncomment and supply secret to add Derby session handling
# Derby session middleware creates req.session and socket.io sessions
.use(express.cookieParser())
.use(store.sessionMiddleware
secret: process.env.SESSION_SECRET || 'YOUR SECRET HERE'
cookie: {maxAge: ONE_YEAR}
)
Does this need to be added to the documentation?
Thanks for the derby-auth btw.
from derby-auth.
oh those are definitely required, i'll add them to the documentation
from derby-auth.
Related Issues (20)
- Cannot read property '1' of undefined HOT 1
- Logout problem HOT 2
- Due to derby-ui-boot not functioning derby-auth example does not work
- Password reset email should be configurable HOT 2
- Make Derby-auth work with stock Derby and Racer HOT 4
- Error: Invalid plugin.decorate value: undefined HOT 6
- Cannot set property 'readPath' of undefined HOT 4
- Login Error: Branch 0.5 HOT 1
- Branch 0.5 initial load error HOT 24
- Remove "Staging" user, require registration HOT 1
- Configuring derby-auth 0.5 HOT 3
- example doesn't work in the 0.5 branch HOT 2
- Limit login to one session per user only HOT 2
- 'username not registered' unable to log on with new account HOT 2
- Installation errors HOT 2
- Examples not working HOT 1
- Missclick ... HOT 4
- Error when reconnect example to server/
- TypeError: Cannot read property '_at' of undefined
- New maintainers HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from derby-auth.