mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 03:52:14 +00:00
use new derby-auth store construction - has to happen before
middleware setup
This commit is contained in:
parent
c0a21ac08d
commit
be4c05ca4f
1 changed files with 4 additions and 2 deletions
|
|
@ -48,7 +48,9 @@ options =
|
|||
domain: process.env.BASE_URL || 'http://localhost:3000'
|
||||
allowPurl: true
|
||||
schema: require('../app/character').newUserObject()
|
||||
customAccessControl: habitrpgStore.customAccessControl
|
||||
|
||||
# This has to happen before our middleware stuff
|
||||
auth.store(store, habitrpgStore.customAccessControl)
|
||||
|
||||
mongo_store = new MongoStore {url: process.env.NODE_DB_URI}, ->
|
||||
expressApp
|
||||
|
|
@ -104,7 +106,7 @@ mongo_store = new MongoStore {url: process.env.NODE_DB_URI}, ->
|
|||
next()
|
||||
|
||||
.use(serverRoutes.API())
|
||||
.use(auth(store, strategies, options))
|
||||
.use(auth.middleware(strategies, options))
|
||||
# Creates an express middleware from the app's routes
|
||||
.use(app.router())
|
||||
.use(expressApp.router)
|
||||
|
|
|
|||
Loading…
Reference in a new issue