You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`fieldModifiers` - default: `{}` - Object with list of functions modifying the contents of fields in the table
141
+
142
+
### Authentication
143
+
Create **auth.js** file in **src/config** directory. You may use template located in **examples/`example`/config/auth.js**. Here you can set default authentication configuration.
-`api` - default: `url` + `path.default` (from **api.js** file) joined fith slash - root url to authentication system API,
185
+
-`prefix` - default: `undefined` - next element of auth API url (after `api` property). It may be helpful if authentication system uses the same API as whole application. Then you can set only `url` property in **api.js** file and `prefix` property in **auth.js** file,
186
+
-`paths` - default:
187
+
```js
188
+
{
189
+
login:'login',
190
+
logout:'logout',
191
+
getUser:'user',
192
+
refreshToken:'refresh-token',
193
+
editUser:'user',
194
+
changePassword:'password'
195
+
}
196
+
```
197
+
an object with a list of paths to individual resources. Eg. if`api` equals `https://your-app.com`, `prefix` is `auth`, then path to edit user data will be:'https://your-app.com/auth/user',
198
+
-`loginWithEmail`- default:`true`- information if application have to use e-mail regex for validation,
199
+
-`loginFieldName`- default:`'email'`- name of login field needed to communication withAPI,
200
+
-`loginEditable`- default:`true`- information if user can edit his login,
201
+
-`loginMinLength`- default:`4`- min length of user's login. Property is needed during login changing,
202
+
- `loginMaxLength` - default: `100` - max length of user's login. Property is needed during login changing,
203
+
-`loginRegex`- default:`/^\w+([.-]?\w+)*@\w+([.-]?\w+)*(\.\w{2,3})+$/` or `/^[a-zA-Z0-9]+$/`if loginWithEmail property is set to `false`- property needed to newlogin validation,
204
+
-`passwordFieldName`- default:`'password'`- name of password field needed to communication withAPI,
205
+
-`passwordEditable`- default:`true`- information if user can edit his password,
206
+
-`passwordMinLength`- default:`8`- min length of user's password. Property is needed during password changing,
207
+
- `passwordMaxLength` - default: `100` - max length of user's password. Property is needed during password changing,
208
+
-`customFields`- default:`[]` (empty array) - list of other user's fields (except of login and password). These fields will be shown on user's profile form. Properties:
209
+
-`name`- default:`undefined`- name of field needed to communication withAPI,
210
+
-`editable`- default:`true`- information if user can modify this field,
211
+
-`required`- default:`undefined`- information if field is obligatory,
212
+
-`regex`- default:`/^.{0,100}$/`,
213
+
-`min`- default:`0`- min length offield. Property is needed during field changing,
214
+
-`max`- default:`100`- max length offield. Property is needed during field changing,
141
215
142
216
### Custom store (Vuex) modules
143
217
Create **store-modules.js** file in**src/config**directory. You may use template located in**examples/`example`/config/store-modules.js**. Here you can add your own modules to the Vuex store.
@@ -164,47 +238,30 @@ Copy **examples/`example`/public** folder with the content to your project main
164
238
Create **main.js** file in**src**directory. This file should look like that:
0 commit comments