mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-07-15 08:22:17 +00:00
fix auth for new derby-auth version
This commit is contained in:
parent
c20552b99f
commit
c0588283a0
2 changed files with 3 additions and 5 deletions
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "habitrpg",
|
||||
"description": "A habit tracker app which treats your goals like a Role Playing Game.",
|
||||
"version": "0.0.0-143",
|
||||
"version": "0.0.0-145",
|
||||
"main": "./server.js",
|
||||
"dependencies": {
|
||||
"derby": "0.3.13",
|
||||
|
|
|
|||
|
|
@ -50,8 +50,7 @@ options =
|
|||
domain: (if process.env.NODE_ENV == 'production' then 'https://habitrpg.com' else "http://localhost:3000")
|
||||
allowPurl: true
|
||||
schema: require('../app/schema').newUserObject()
|
||||
auth.init expressApp, store, strategies, options
|
||||
|
||||
|
||||
expressApp
|
||||
.use(express.favicon())
|
||||
# Gzip static files and serve from memory
|
||||
|
|
@ -78,13 +77,12 @@ expressApp
|
|||
# the app router to pass server accessible data to a model
|
||||
.use(priv.middleware)
|
||||
.use(habitrpgMiddleware)
|
||||
.use(auth.middleware())
|
||||
.use(auth(store, strategies, options))
|
||||
# Creates an express middleware from the app's routes
|
||||
.use(app.router())
|
||||
.use(expressApp.router)
|
||||
.use(serverError root)
|
||||
|
||||
auth.routes()
|
||||
priv.routes(expressApp)
|
||||
require('./serverRoutes')(expressApp, root, derby)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue