Skip to content

Instantly share code, notes, and snippets.

@claustres
Last active May 18, 2018 17:05
Show Gist options
  • Save claustres/e8505138dce4674ccfdc0ebd78615ea2 to your computer and use it in GitHub Desktop.
Save claustres/e8505138dce4674ccfdc0ebd78615ea2 to your computer and use it in GitHub Desktop.
Password policy with FeathersJS - Config
var path = require('path')
var fs = require('fs')
module.exports = {
host: process.env.HOSTNAME || 'localhost',
port: 8081,
authentication: {
secret: 'xxx',
strategies: [
'jwt',
'local'
],
passwordPolicy: {
minLength: 8,
maxLength: 128,
uppercase: true,
lowercase: true,
digits: true,
symbols: true,
prohibited: fs.readFileSync(path.join(__dirname, '10k_most_common_passwords.txt')).toString().split('\n')
},
...
},
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment