-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.ts
More file actions
80 lines (62 loc) · 1.89 KB
/
Copy pathtypes.ts
File metadata and controls
80 lines (62 loc) · 1.89 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
import { EmailAdapter } from 'adminforth';
import {type PluginsCommonOptions } from "adminforth";
export interface PluginOptions extends PluginsCommonOptions {
/**
* Field name in auth resource which contains email
*/
emailField: string;
/**
* To work properly, this plugin requires a virtual password field in auth resource,
* which will define any constraints which determine the password strength (regex, minLength).
* When user will enter passowrd, it will be validated against this field constraints
* If you don't need it in backoffice itself, you can add it and set showIn = []
*/
passwordField: string;
/**
* Non-virtual field name in auth resource which contains password hash
*/
passwordHashField: string;
/**
* Default which will be assigned to user by default
* e.g. can be used to set default role
*/
defaultFieldValues?: {
[key: string]: any;
}
/**
* If not set user will not be asked for email confirmation (might be dangerous)
*/
confirmEmails?: {
/**
* A boolean field in auth resource which will be set to true when email is confirmed.
* Must have boolean type.
*/
emailConfirmedField: string;
/**
* From which email to send password reset emails
* e.g. no-reply@example.com
* Example.com must be allowed in provider to send emails
*/
sendFrom: string;
/**
* Adapter to send emails
*/
adapter: EmailAdapter;
}
/**
* Hooks to be executed before and after user is created
*/
hooks?: {
beforeUserSave?: any;
afterUserSave?: any;
}
/**
* Signup component order inder login button
*/
loginPageComponentOrder?: number;
/**
* The origin(s) (scheme + host + optional port) of the admin panel that are
* allowed to appear in password reset links, e.g. "https://admin.example.com".
*/
expectedOrigin: string | string[];
}