-
-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy pathauth.development.config.js
More file actions
57 lines (56 loc) · 1.67 KB
/
auth.development.config.js
File metadata and controls
57 lines (56 loc) · 1.67 KB
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
const config = {
audit: {
routeTypeMap: {
auth: 'User',
},
},
auth: {
lockout: {
maxAttempts: 5, // lock account after N consecutive failed login attempts
lockDuration: 30, // lock duration in minutes
},
},
sign: {
in: true, // disable signin
up: true, // disable signup
cap: null, // null = unlimited; integer = hard ceiling on TOTAL accounts (invited included)
inviteExpiresInDays: 14, // signup invite link validity
},
// jwt is for token authentication
jwt: {
secret: 'WaosSecretKeyExampleToChnageAbsolutely', // secret for hash
expiresIn: 7 * 24 * 60 * 60, // token expire in x sec
},
oAuth: {
google: {
// google console / api & service / identifier
clientID: null,
clientSecret: null,
callbackURL: null,
},
apple: {
clientID: null, // developer.apple.com service identifier
teamID: null, // developer.apple.com team identifier
keyID: null, // developer.apple.com private key identifier
callbackURL: null,
privateKeyLocation: null,
},
},
// zxcvbn is used to manage password security
zxcvbn: {
forbiddenPasswords: ['12345678', 'azertyui', 'qwertyui', 'azertyuiop', 'qwertyuiop'], // passwords forbidden
minSize: 8, // min password size
maxSize: 126, // max password size
minimumScore: 3, // min password complexity score
},
rateLimit: {
auth: {
windowMs: 15 * 60 * 1000, // 15 min
max: 200, // 200 requests per window in dev (lenient for testing)
message: { message: 'Too many requests, please try again later.' },
standardHeaders: true,
legacyHeaders: false,
},
},
};
export default config;