-
Notifications
You must be signed in to change notification settings - Fork 0
/
app.rb
38 lines (31 loc) · 747 Bytes
/
app.rb
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
# frozen_string_literal: true
Dir['./config/initializers/*.rb'].sort.each { |file| require file }
require 'roda'
class App < Roda
plugin :public
plugin :rodauth, csrf: false, flash: false, json: :only do
secret = ENV.fetch('HMAC_SECRET')
enable :active_sessions,
:audit_logging,
:change_login,
:change_password,
:create_account,
:disallow_common_passwords,
:jwt,
:jwt_refresh,
:lockout,
:login,
:logout,
:password_complexity,
:reset_password,
:single_session
# :base
hmac_secret secret
# :jwt
jwt_secret secret
end
route do |r|
r.public
r.rodauth
end
end