aboutsummaryrefslogtreecommitdiffstats
path: root/config/persona.js
diff options
context:
space:
mode:
authorLibravatar vantezzen <hello@vantezzen.io>2020-04-02 17:09:11 +0200
committerLibravatar vantezzen <hello@vantezzen.io>2020-04-02 17:09:11 +0200
commit6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa (patch)
tree77778897d7411d7c273d1b1bdf7caf7ba75f85e2 /config/persona.js
parentUpgrade dependencies (diff)
downloadferdium-server-6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa.tar.gz
ferdium-server-6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa.tar.zst
ferdium-server-6ed9da44690d5f68a5bb4e398c0a4ad4083ed6fa.zip
#16 Implement Password reset
Diffstat (limited to 'config/persona.js')
-rw-r--r--config/persona.js98
1 files changed, 98 insertions, 0 deletions
diff --git a/config/persona.js b/config/persona.js
new file mode 100644
index 0000000..71fbc3f
--- /dev/null
+++ b/config/persona.js
@@ -0,0 +1,98 @@
1'use strict'
2
3/*
4|--------------------------------------------------------------------------
5| Persona
6|--------------------------------------------------------------------------
7|
8| The persona is a simple and opinionated service to register, login and
9| manage user account
10|
11*/
12
13module.exports = {
14 /*
15 |--------------------------------------------------------------------------
16 | Uids
17 |--------------------------------------------------------------------------
18 |
19 | An array of fields, that can be used to indetify a user uniquely. During
20 | login and reset password, these fields be checked against the user
21 | input
22 |
23 */
24 uids: ['email'],
25
26 /*
27 |--------------------------------------------------------------------------
28 | Email field
29 |--------------------------------------------------------------------------
30 |
31 | The name of the email field inside the database and the user payload.
32 |
33 */
34 email: 'email',
35
36 /*
37 |--------------------------------------------------------------------------
38 | Password
39 |--------------------------------------------------------------------------
40 |
41 | The password field to be used for verifying and storing user password
42 |
43 */
44 password: 'password',
45
46 /*
47 |--------------------------------------------------------------------------
48 | New account state
49 |--------------------------------------------------------------------------
50 |
51 | State of user when a new account is created
52 |
53 */
54 newAccountState: 'pending',
55
56 /*
57 |--------------------------------------------------------------------------
58 | Verified account state
59 |--------------------------------------------------------------------------
60 |
61 | State of user after they verify their email address
62 |
63 */
64 verifiedAccountState: 'active',
65
66 /*
67 |--------------------------------------------------------------------------
68 | Model
69 |--------------------------------------------------------------------------
70 |
71 | The model to be used for verifying and creating users
72 |
73 */
74 model: 'App/Models/User',
75
76 /*
77 |--------------------------------------------------------------------------
78 | Date Format
79 |--------------------------------------------------------------------------
80 |
81 | The date format for the tokens table. It is required to calculate the
82 | expiry of a token.
83 |
84 */
85 dateFormat: 'YYYY-MM-DD HH:mm:ss',
86
87 /*
88 |--------------------------------------------------------------------------
89 | Validation messages
90 |--------------------------------------------------------------------------
91 |
92 | An object of validation messages to be used when validation fails.
93 |
94 */
95 validationMessages: () => {
96 return {}
97 }
98}