geolets/server/config/membership.js
2016-07-14 17:15:55 +02:00

58 lines
1.4 KiB
JavaScript

/*
* Contains all configuration for membership
* @module config/membership
*
* @see module:services/invites/invites-middleware
*/
'use strict';
const site = require('./site');
module.exports = {
invite: {
from: site.title + ' Robot <' + site.emails.robot + '>',
subject: 'You have been invited to ' + site.title
},
paths: {
register: '/admin/register',
login: '/admin/login',
forgot: '/admin/forgot',
reset: '/admin/reset'
},
remember: {
// if expires is defined, it will be used. otherwise maxage
expires: new Date('2038-01-19T03:14:07.000Z'),
//expires: Date.now() - 1,
maxAge: 30 * 24 * 60 * 60 * 1000,
},
messages: {
login: {
notLocal: 'Account requires external login.',
wrongPassword: 'Wrong password.',
noLocalUser: 'No user registered with that email.',
noExternalUser: 'The account is not connected to this website.',
externalLoginFailed: 'External login failed.',
unverified: 'This account has not been verified.',
banned: 'User is banned.',
blocked: 'User is blocked due to too many login attempts.'
},
register: {
notAuthorized: 'The email is not authorized to create an account.',
duplicateEmail: 'The email has already been registered.'
}
},
passport: {
local: {
usernameField: 'email'
},
scope: [ 'email' ],
}
};