-
Notifications
You must be signed in to change notification settings - Fork 2
/
config.toml
111 lines (94 loc) · 2.52 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
[http]
# address = "0.0.0.0:80"
# real_ip = { header = "X-Real-Ip", set_from = "127.0.0.1" }
allowed_origins = [] # RegexSet
[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"
[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 = ""
[internal]
jwt_ttl = "10s"
# shop_url = ""
[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 = ""
# [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"]