-
Notifications
You must be signed in to change notification settings - Fork 48
/
config.default.js
120 lines (106 loc) · 3.84 KB
/
config.default.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
exports.appname = 'lockit - Test App';
exports.url = 'http://localhost:3000';
// email settings
exports.emailType = 'nodemailer-stub-transport';
exports.emailSettings = {
service: 'none',
auth: {
user: 'none',
pass: 'none'
}
};
// lock account
exports.failedLoginsWarning = 3;
exports.failedLoginAttempts = 5;
exports.accountLockedTime = '20 minutes';
// send html to client (false) or only json (true)
exports.rest = false;
// signup settings
exports.signup = {
route: '/signup',
tokenExpiration: '1 day',
views: {
signup: '', // input fields 'username', 'email' and 'password' | local variable 'error' | POST /'signup.route'
linkExpired: '', // message link has expired | input field 'email' | POST /'signup.route'/resend-verification
verified: '', // message email is now verified and maybe link to /'login.route'
signedUp: '', // message email has been sent => check your inbox
resend: '' // input field 'email' | local variable 'error' | POST /'signup.route'/resend-verification
},
handleResponse: true // let lockit handle the response after signup success
};
// login settings
exports.login = {
route: '/login',
logoutRoute: '/logout',
views: {
login: '', // input fields 'login' and 'password' | POST /'login.route' | local variable 'error'
loggedOut: '' // message that user logged out
},
handleResponse: true // let lockit handle the response after login/logout success
};
// forgot password settings
exports.forgotPassword = {
route: '/forgot-password',
tokenExpiration: '1 day',
views: {
forgotPassword: '', // input field 'email' | POST /'forgotPassword.route' | local variable 'error'
newPassword: '', // input field 'password' | POST /'forgotPassword.route'/#{token} | local variable 'error'
changedPassword: '',// message that password has been changed successfully
linkExpired: '', // message that link has expired and maybe link to /'forgotPassword.route'
sentEmail: '' // message that email with token has been sent
}
};
// delete account settings
exports.deleteAccount = {
route: '/delete-account',
views: {
remove: '', // input fields 'username', 'phrase', 'password' | POST /'deleteAccount.route' | local variable 'error'
removed: '' // message that account has been deleted
},
handleResponse: true // let lockit handle the response after delete account success
};
// simple white email template
exports.emailTemplate = 'lockit-template-blank';
// from email address
exports.emailFrom = '[email protected]';
// email signup template
exports.emailSignup = {
subject: 'Welcome to <%- appname %>',
text: [
'<h2>Hello <%- username %></h2>',
'Welcome to <%- appname %>.',
'<p><%- link %> to complete your registration.</p>'
].join(''),
linkText: 'Click here'
};
// signup process -> email already taken
exports.emailSignupTaken = {
subject: 'Email already registered',
text: [
'<h2>Hello <%- username %></h2>',
'you or someone else tried to sign up for <%- appname %>.',
'<p>Your email is already registered and you cannot sign up twice.',
' If you haven\'t tried to sign up, you can safely ignore this email. Everything is fine!</p>',
'<p>The <%- appname %> Team</p>'
].join('')
};
// signup process -> resend email with verification link
exports.emailResendVerification = {
subject: 'Complete your registration',
text: [
'<h2>Hello <%- username %></h2>',
'here is the link again. <%- link %> to complete your registration.',
'<p>The <%- appname %> Team</p>'
].join(''),
linkText: 'Click here'
};
// forgot password
exports.emailForgotPassword = {
subject: 'Reset your password',
text: [
'<h2>Hey <%- username %></h2>',
'<%- link %> to reset your password.',
'<p>The <%- appname %> Team</p>'
].join(''),
linkText: 'Click here'
};