aboutsummaryrefslogtreecommitdiffhomepage
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/initializers/installer.js9
1 files changed, 4 insertions, 5 deletions
diff --git a/server/initializers/installer.js b/server/initializers/installer.js
index ec9175f34..c2f5e47bc 100644
--- a/server/initializers/installer.js
+++ b/server/initializers/installer.js
@@ -3,6 +3,7 @@
3const async = require('async') 3const async = require('async')
4const config = require('config') 4const config = require('config')
5const mkdirp = require('mkdirp') 5const mkdirp = require('mkdirp')
6const passwordGenerator = require('password-generator')
6const path = require('path') 7const path = require('path')
7 8
8const checker = require('./checker') 9const checker = require('./checker')
@@ -56,8 +57,7 @@ function createOAuthClientIfNotExist (callback) {
56 57
57 logger.info('Creating a default OAuth Client.') 58 logger.info('Creating a default OAuth Client.')
58 59
59 // TODO: generate password 60 const secret = passwordGenerator(32, false)
60 const secret = 'megustalabanana'
61 Users.createClient(secret, [ 'password' ], function (err, id) { 61 Users.createClient(secret, [ 'password' ], function (err, id) {
62 if (err) return callback(err) 62 if (err) return callback(err)
63 63
@@ -78,9 +78,8 @@ function createOAuthUserIfNotExist (callback) {
78 78
79 logger.info('Creating the administrator.') 79 logger.info('Creating the administrator.')
80 80
81 // TODO: generate password 81 const username = 'root'
82 const username = 'admin' 82 const password = passwordGenerator(8, true)
83 const password = 'nomegustalabanana'
84 83
85 Users.createUser(username, password, function (err) { 84 Users.createUser(username, password, function (err) {
86 if (err) return callback(err) 85 if (err) return callback(err)