-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfig.toml
138 lines (115 loc) · 2.88 KB
/
config.toml
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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
[http]
# address = "0.0.0.0:80"
# real_ip = { header = "X-Real-Ip", set_from = "127.0.0.1" }
allowed_origins = []
[database]
# url = "" # https://docs.rs/tokio-postgres/latest/tokio_postgres/config/struct.Config.html
max_connections = 10
min_connections = 0
acquire_timeout = "10s"
idle_timeout = "10m"
max_lifetime = "30m"
run_migrations = true
[cache]
# url = "" # https://docs.rs/redis/latest/redis/#connection-parameters
max_connections = 10
min_connections = 0
acquire_timeout = "10s"
idle_timeout = "10m"
max_lifetime = "30m"
[email]
# smtp_url = "" # https://docs.rs/lettre/latest/lettre/transport/smtp/struct.AsyncSmtpTransport.html#method.from_url
# from = ""
[jwt]
# secret = ""
download_token_ttl = "10m"
[internal]
jwt_ttl = "10s"
[health]
database_cache_ttl = "10s"
cache_cache_ttl = "10s"
email_cache_ttl = "10s"
[user]
name_change_rate_limit = "30d"
verification_code_ttl = "4h"
verification_redirect_url = "https://bootstrap.academy/auth/verify-account"
password_reset_code_ttl = "4h"
password_reset_redirect_url = "https://bootstrap.academy/auth/reset-password"
newsletter_code_ttl = "4h"
newsletter_redirect_url = "https://bootstrap.academy/account/newsletter"
[session]
access_token_ttl = "5m"
refresh_token_ttl = "30d"
refresh_token_length = 64
login_fails_before_captcha = 3
[totp]
secret_length = 32
[contact]
# email = ""
[recaptcha]
enable = true
# siteverify_endpoint_override = ""
# sitekey = ""
# secret = ""
min_score = 0.5
[vat]
# validate_endpoint_override = ""
[paypal]
# base_url_override = ""
# client_id = ""
# client_secret = ""
[coin]
purchase_min = 500
purchase_max = 1000000
[heart]
max = 6
refill_price = 50
auto_refill_time = "00:00" # UTC
[premium]
monthly_price = 1000
yearly_price = 10000
[render]
# chrome_bin = ""
[finance]
vat_percent = 19
# invoices_archive = ""
# credit_notes_archive = ""
# [sentry]
# enable = true
# dsn = ""
[oauth2]
enable = true
registration_token_ttl = "10m"
[oauth2.providers.github]
enable = true
name = "GitHub"
# client_id = ""
# client_secret = ""
auth_url = "https://github.com/login/oauth/authorize"
token_url = "https://github.com/login/oauth/access_token"
userinfo_url = "https://api.github.com/user"
userinfo_id_key = "id"
userinfo_name_key = "login"
scopes = []
[oauth2.providers.discord]
enable = true
name = "Discord"
# client_id = ""
# client_secret = ""
auth_url = "https://discord.com/oauth2/authorize"
token_url = "https://discord.com/api/oauth2/token"
userinfo_url = "https://discord.com/api/users/@me"
userinfo_id_key = "id"
userinfo_name_key = "username"
scopes = ["identify"]
[oauth2.providers.google]
enable = true
name = "Google"
# client_id = ""
# client_secret = ""
auth_url = "https://accounts.google.com/o/oauth2/v2/auth"
token_url = "https://www.googleapis.com/oauth2/v3/token"
userinfo_url = "https://www.googleapis.com/oauth2/v3/userinfo"
userinfo_id_key = "sub"
userinfo_name_key = "given_name"
scopes = ["openid", "profile"]