Commit 69243df4 authored by anton's avatar anton
Browse files

Remove jwt and local auth entirely

parent 75281df4
Pipeline #160605 passed with stage
in 52 seconds
......@@ -14,24 +14,11 @@
"authStrategies": [
"auth0"
],
"jwtOptions": {
"header": {
"typ": "access"
},
"audience": "https://app.motionbank.org",
"issuer": "feathers",
"algorithm": "HS256",
"expiresIn": "1d"
},
"local": {
"usernameField": "email",
"passwordField": "password"
},
"auth0": {
"create": true,
"autoregister": true,
"domain": "auth.motionbank.org",
"services": ["annotations", "maps"]
"services": ["annotations", "maps", "users"]
}
},
"mongodb": "mongodb://localhost:27017/motionbank_api",
......
// const { authenticate } = require('@feathersjs/authentication').hooks
// const { fromAuth0 } = require('@morphatic/feathers-auth0-strategy')
// const { isProvider, some, unless } = require('feathers-hooks-common')
const {
hashPassword, protect
} = require('@feathersjs/authentication-local').hooks
module.exports = {
before: {
all: [], // [unless(some(isProvider('server'), fromAuth0()), authenticate('auth0'))],
find: [], // [authenticate('jwt')],
get: [], // [authenticate('jwt')],
create: [hashPassword('password')],
update: [hashPassword('password')], // authenticate('jwt')],
patch: [hashPassword('password')], // authenticate('jwt')],
remove: [] // [authenticate('jwt')]
all: [],
find: [],
get: [],
create: [],
update: [],
patch: [],
remove: []
},
after: {
all: [
// Make sure the password field is never sent to the client
// Always must be the last hook
protect('password')
],
all: [],
find: [],
get: [],
create: [],
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment